:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(242, 242, 247, 0.88);
  --surface-3: rgba(255, 255, 255, 0.56);
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.18);
  --line-strong: rgba(60, 60, 67, 0.28);
  --green: rgba(60, 60, 67, 0.68);
  --green-2: #1d1d1f;
  --teal: rgba(60, 60, 67, 0.62);
  --blue: #1d1d1f;
  --blue-2: #3a3a3c;
  --amber: rgba(60, 60, 67, 0.52);
  --red: rgba(60, 60, 67, 0.74);
  --slate: #1d1d1f;
  --sidebar: rgba(246, 246, 248, 0.82);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 46%, #ececf1 100%);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

.stack {
  display: grid;
  gap: 10px;
}

.stack.tight {
  gap: 4px;
}

.divider {
  height: 1px;
  background: var(--line);
}

.login-view {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background: #f5f7fa;
}

.login-view[data-view="register"],
.login-view[data-view="register-result"] {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(245, 245, 247, 0.92) 46%, rgba(232, 232, 237, 0.96) 100%);
}

.login-split {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.login-showcase {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #f0f2f5;
  color: rgba(60, 60, 60, 0.9);
}

.login-showcase-copy {
  width: min(420px, 72%);
  transform: translateY(96px);
}

.login-showcase-copy p {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: 0;
}

.login-showcase-copy h2 {
  margin: 0;
  color: rgba(40, 40, 40, 0.92);
  font-size: 30px;
  line-height: 1.45;
  font-weight: 700;
}

.login-view[data-view="login"] .login-panel {
  align-self: center;
  justify-self: center;
  width: min(420px, calc(100% - 56px));
  min-height: 470px;
  padding: 40px;
  border: 0;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 24px 68px rgba(35, 45, 60, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.login-view[data-view="login"] .login-panel::before {
  display: none;
}

.login-view[data-view="login"] .login-panel label {
  gap: 0;
  color: transparent;
  font-size: 0;
}

.login-view[data-view="login"] .login-panel label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-view[data-view="login"] .login-panel input {
  height: 52px;
  padding: 0 0 0 0;
  border: 0;
  border-bottom: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #333;
  font-size: 16px;
}

.login-view[data-view="login"] .login-panel input::placeholder {
  color: rgba(51, 51, 51, 0.48);
}

.login-view[data-view="login"] .login-panel .primary {
  min-height: 40px;
  margin-top: 4px;
  border-radius: 10px;
  background: #4b846a;
  color: #fff;
  box-shadow: none;
  font-size: 16px;
  font-weight: 500;
}

.login-options,
.login-register-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(60, 60, 60, 0.8);
  font-size: 14px;
}

.login-remember {
  width: auto;
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 6px !important;
  color: rgba(0, 0, 0, 0.88) !important;
  font-size: 14px !important;
}

.login-remember input {
  width: 14px !important;
  height: 14px !important;
  min-height: 0;
  border: 1px solid rgba(60, 60, 67, 0.28) !important;
  border-radius: 3px !important;
}

.login-remember span {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
}

.login-link {
  border: 0;
  background: transparent;
  color: #4b846a;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
}

.login-register-row {
  justify-content: center;
  margin-top: 4px;
}

.login-view[data-view="login"] .login-brand-title {
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(0, 0, 0, 0.88);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  font-size: 34px;
  line-height: 1.25;
  font-weight: 700;
  text-align: left;
  transform: none;
}

.login-view[data-view="login"] .login-brand-title span {
  color: #4b846a;
  -webkit-text-fill-color: #4b846a;
  -webkit-text-stroke: 0;
  filter: none;
  transform: none;
}

.login-view[data-view="login"] .login-brand-title::before,
.login-view[data-view="login"] .login-brand-title::after {
  display: none;
}

.login-view[data-view="login"] .login-brand-title::after {
  content: "登录您的账号";
  display: block;
  position: static;
  height: auto;
  margin-top: 10px;
  background: none;
  color: rgba(0, 0, 0, 0.58);
  font-size: 14px;
  font-weight: 400;
}

.login-view[data-view="login"] .ghost {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4b846a;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  justify-self: center;
}

.login-view[data-view="login"] .ghost::before {
  content: "还没有账号？";
  margin-right: 6px;
  color: rgba(60, 60, 60, 0.8);
  font-weight: 400;
}

.login-view[data-view="login"] #loginHint {
  min-height: 18px;
  margin: -2px 0 0;
  text-align: center;
  font-size: 12px;
  color: rgba(60, 60, 60, 0.62);
}

.login-layout {
  width: min(840px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.login-panel {
  width: min(392px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(28px) saturate(1.35);
  -webkit-backdrop-filter: blur(28px) saturate(1.35);
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent 34%);
}

.login-panel > * {
  position: relative;
}

.login-brand-title {
  margin: 4px 0 8px;
  padding: 18px 12px 16px;
  border: 1px solid rgba(197, 161, 92, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(241, 238, 232, 0.54)),
    radial-gradient(circle at 22% 18%, rgba(158, 43, 37, 0.09), transparent 34%),
    radial-gradient(circle at 78% 12%, rgba(197, 161, 92, 0.18), transparent 32%),
    radial-gradient(circle at 84% 86%, rgba(23, 37, 42, 0.08), transparent 36%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 -1px 0 rgba(197, 161, 92, 0.12),
    0 16px 38px rgba(29, 29, 31, 0.1);
  font-size: 36px;
  font-weight: 700;
  font-family: "STXingkai", "华文行楷", "STCaiyun", "华文彩云", "Kaiti SC", "KaiTi", "FangSong", serif;
  line-height: 1.08;
  letter-spacing: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-brand-title span {
  display: inline-block;
  color: #111113;
  -webkit-text-fill-color: #111113;
  -webkit-text-stroke: 0.22px rgba(197, 161, 92, 0.28);
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.92))
    drop-shadow(0 8px 13px rgba(23, 23, 23, 0.12));
  transform: skewX(-2deg);
}

.login-brand-title::before,
.login-brand-title::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 161, 92, 0.52), rgba(122, 31, 26, 0.24), transparent);
}

.login-brand-title::before {
  top: 8px;
}

.login-brand-title::after {
  bottom: 8px;
}

.register-panel {
  width: min(392px, 100%);
  gap: 12px;
}

.result-box {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-3);
}

.result-box strong {
  font-size: 13px;
  color: var(--muted);
}

.result-box span {
  font-size: 22px;
  font-weight: 850;
  color: var(--text);
  word-break: break-all;
}

.eyebrow {
  margin: 0;
  color: #3a3a3c;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.18;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 18px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

.quote-description-field {
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(242, 242, 247, 0.54));
}

.quote-description-field span {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.quote-description-field textarea {
  min-height: 156px;
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
    repeating-linear-gradient(180deg, transparent 0, transparent 29px, rgba(60, 60, 67, 0.08) 30px);
  line-height: 1.72;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(60, 60, 67, 0.42);
  box-shadow: 0 0 0 4px rgba(60, 60, 67, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.9);
}

.primary,
.ghost,
.nav {
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 700;
}

.primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(229, 229, 234, 0.76));
  color: var(--text);
  border-color: var(--line-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.primary:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(216, 216, 221, 0.82));
}

.ghost {
  background: rgba(255, 255, 255, 0.48);
  color: #3a3a3c;
  border-color: var(--line);
}

.ghost.danger {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(255, 242, 241, 0.66);
}

.primary.confirm-done,
.primary.confirm-done:disabled {
  color: #fff;
  border-color: rgba(180, 35, 24, 0.42);
  background: linear-gradient(180deg, #ff453a, #d92d20);
  box-shadow: 0 10px 22px rgba(217, 45, 32, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  opacity: 1;
  cursor: default;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.hint.empty {
  padding: 12px 0;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: var(--sidebar);
  color: var(--text);
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 22px;
  border-right: 1px solid var(--line);
  backdrop-filter: blur(28px) saturate(1.25);
  -webkit-backdrop-filter: blur(28px) saturate(1.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(118, 118, 128, 0.16);
  color: var(--text);
  border-radius: 8px;
  font-weight: 900;
  overflow: hidden;
  flex: 0 0 auto;
}

.mark.has-logo {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(60, 60, 67, 0.12);
}

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

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
}

.tenant-logo-profile {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.tenant-logo-preview {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(118, 118, 128, 0.12);
  color: var(--text);
  font-weight: 900;
}

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

.tenant-logo-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.account-card {
  position: relative;
  padding: 9px 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.account-copy {
  min-width: 0;
}

.account-copy strong,
.account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 13px;
  line-height: 1.25;
}

.account-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.account-menu-button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.14);
  color: var(--text);
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.account-menu-button:hover,
.account-card.menu-open .account-menu-button {
  background: rgba(118, 118, 128, 0.22);
}

.account-actions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  gap: 8px;
  grid-template-columns: 1fr;
  padding: 8px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.account-card.menu-open .account-actions {
  display: grid;
}

.account-actions .ghost {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 7px;
  justify-content: flex-start;
}

nav {
  display: grid;
  gap: 18px;
  align-content: start;
}

.nav-group {
  display: grid;
  gap: 8px;
}

.nav-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nav {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #3a3a3c;
}

.site-browser-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  border-color: rgba(60, 60, 67, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
}

.site-browser-nav::after {
  content: "\2197";
  color: var(--muted);
  font-size: 15px;
}

.nav-section {
  display: grid;
  gap: 6px;
}

.nav-parent {
  width: 100%;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.nav-parent::after {
  content: "›";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.nav-parent:hover {
  background: rgba(118, 118, 128, 0.12);
}

.nav-section.expanded .nav-parent::after {
  transform: rotate(90deg);
}

.nav-section:not(.expanded) .sub-nav {
  display: none;
}

.sub-nav {
  min-height: 34px;
  padding-left: 28px;
  font-size: 13px;
  color: var(--muted);
}

.nav.active,
.nav:hover {
  background: rgba(118, 118, 128, 0.18);
  color: var(--text);
}

.main {
  min-width: 0;
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

#tenantSwitcher {
  min-width: 240px;
}

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

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

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

.metrics article,
.panel,
.item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.metrics article {
  min-height: 100px;
  padding: 18px;
  display: grid;
  align-content: center;
  gap: 6px;
}

.metrics span {
  font-size: 28px;
  font-weight: 850;
}

.metrics small,
.metrics em,
.item small {
  color: var(--muted);
  font-style: normal;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

.merchant-architecture-board {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(144, 126, 255, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(249, 249, 255, 0.96), rgba(244, 245, 255, 0.9)),
    radial-gradient(circle at 18% 0%, rgba(197, 184, 255, 0.36), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(157, 177, 255, 0.25), transparent 32%);
  box-shadow: 0 22px 56px rgba(91, 86, 150, 0.12);
  overflow: hidden;
}

.merchant-architecture-title {
  min-height: 76px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.62fr);
  align-items: center;
  gap: 18px;
  border-radius: 15px;
  background: linear-gradient(180deg, rgba(214, 207, 255, 0.76), rgba(246, 246, 255, 0.62));
  color: #1d1d1f;
}

.merchant-architecture-title span {
  display: inline-flex;
  margin-bottom: 5px;
  color: rgba(70, 64, 130, 0.72);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.merchant-architecture-title h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
}

.merchant-architecture-title small {
  color: rgba(29, 29, 31, 0.66);
  font-size: 14px;
  line-height: 1.65;
}

.merchant-architecture-group {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  gap: 12px;
}

.merchant-architecture-rail {
  min-height: 156px;
  padding: 18px 12px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(204, 194, 255, 0.92), rgba(219, 211, 255, 0.82));
  color: #1f2032;
  text-align: center;
}

.merchant-architecture-rail span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #6c57d8;
  font-size: 12px;
  font-weight: 900;
}

.merchant-architecture-rail strong {
  font-size: 21px;
  line-height: 1.28;
}

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

.merchant-architecture-layer {
  min-width: 0;
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid rgba(144, 126, 255, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(225, 221, 255, 0.82), rgba(255, 255, 255, 0.92) 38%),
    rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.merchant-architecture-layer.wide {
  grid-column: 1 / -1;
}

.merchant-architecture-layer h3 {
  margin: 0;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(206, 199, 255, 0.72), rgba(238, 236, 255, 0.7));
  font-size: clamp(18px, 2vw, 25px);
  text-align: center;
}

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

.merchant-architecture-layer:not(.wide) .merchant-architecture-chipgrid {
  grid-template-columns: 1fr;
}

.merchant-architecture-chipgrid button {
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid rgba(187, 120, 255, 0.34);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.88);
  color: #242532;
  box-shadow: 0 8px 20px rgba(112, 96, 190, 0.08);
  font-weight: 760;
  line-height: 1.35;
}

.merchant-architecture-chipgrid button:hover {
  border-color: rgba(102, 113, 255, 0.54);
  background: #fff;
  transform: translateY(-1px);
}

#tab-merchant-overview {
  display: grid;
  gap: 14px;
}

#tab-merchant-overview.hidden {
  display: none !important;
}

#tab-merchant-overview .merchant-overview-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

#tab-merchant-overview .merchant-overview-metrics article {
  min-height: 86px;
  padding: 16px 18px;
  border-color: rgba(144, 126, 255, 0.2);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(234, 231, 255, 0.84), rgba(255, 255, 255, 0.88) 58%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(91, 86, 150, 0.08);
}

#tab-merchant-overview .merchant-overview-metrics span {
  color: #1d1d1f;
  font-size: 26px;
}

#tab-merchant-overview .merchant-overview-metrics small,
#tab-merchant-overview .merchant-overview-metrics em {
  color: rgba(29, 29, 31, 0.62);
}

.merchant-ops-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
}

.merchant-operation-panel {
  padding: 18px;
  border-color: rgba(144, 126, 255, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(229, 225, 255, 0.72), rgba(255, 255, 255, 0.88) 42%),
    rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(91, 86, 150, 0.08);
}

.merchant-operation-panel .panel-head {
  min-height: 50px;
  padding: 10px 14px;
  margin: -4px -4px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(212, 206, 255, 0.68), rgba(241, 239, 255, 0.58));
}

.merchant-operation-panel .panel-head h3 {
  font-size: 22px;
}

.merchant-operation-panel label {
  margin-top: 10px;
}

.merchant-operation-panel select,
.merchant-operation-panel textarea,
.merchant-operation-panel input {
  border-color: rgba(144, 126, 255, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

.merchant-operation-panel .primary {
  min-height: 44px;
  margin-top: 12px;
  border-radius: 12px;
}

.merchant-operation-panel .item {
  border-color: rgba(144, 126, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
}

.merchant-recent-panel {
  overflow: hidden;
}

#tab-merchant-moments {
  display: grid;
  gap: 10px;
  width: min(100%, 860px);
  margin: 0 auto;
}

#tab-merchant-moments.hidden {
  display: none !important;
}

.moment-agent-system {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 246, 248, 0.68));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

.moment-agent-hero {
  min-height: auto;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.56);
}

.moment-agent-hero span {
  display: inline-flex;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.moment-agent-hero h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.12;
}

.moment-agent-hero p {
  max-width: 720px;
  margin: 5px 0 0;
  color: rgba(29, 29, 31, 0.66);
  font-size: 12px;
  line-height: 1.42;
}

.moment-agent-score {
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.moment-agent-score strong {
  font-size: 21px;
  line-height: 1;
}

.moment-agent-score small {
  font-size: 11px;
  color: rgba(29, 29, 31, 0.58);
}

.moment-agent-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.moment-agent-flow button,
.moment-agent-grid article {
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  box-shadow: none;
}

.moment-agent-flow button {
  min-height: 46px;
  padding: 7px 6px;
  display: grid;
  gap: 3px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.moment-agent-flow small {
  color: #0066cc;
  font-size: 11px;
  font-weight: 850;
}

.moment-agent-flow strong {
  font-size: 13px;
  line-height: 1.28;
}

.moment-agent-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.moment-agent-grid article {
  min-width: 0;
  padding: 8px 6px;
  display: grid;
  gap: 5px;
  align-content: start;
}

.moment-agent-grid article > div {
  display: grid;
  gap: 3px;
}

.moment-agent-grid span {
  color: rgba(29, 29, 31, 0.62);
  font-size: 11px;
  font-weight: 720;
}

.moment-agent-grid strong {
  font-size: 14px;
  line-height: 1.2;
}

.moment-agent-grid p {
  min-height: 0;
  margin: 0;
  color: rgba(29, 29, 31, 0.62);
  font-size: 11px;
  line-height: 1.32;
}

.moment-agent-grid .ghost {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

#tab-merchant-moments > .panel,
#tab-merchant-moments .split > .panel {
  padding: 14px;
  gap: 12px;
  border-color: rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 246, 248, 0.62));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035);
}

#tab-merchant-moments .panel-head {
  min-height: auto;
  padding: 0;
  margin: 0 0 6px;
  gap: 12px;
  align-items: center;
  border-radius: 0;
  background: transparent;
}

.moment-quick-panel {
  border-color: rgba(60, 60, 67, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 246, 248, 0.68)) !important;
}

.moment-quick-panel .panel-head h3 {
  font-size: 19px;
  line-height: 1.2;
}

.moment-quick-panel .primary {
  width: 100%;
  min-height: 46px;
  border-radius: 10px;
}

.moment-real-image-picker {
  display: grid;
  gap: 7px;
}

.moment-real-image-picker .media-slots {
  grid-template-columns: minmax(150px, 170px);
}

.moment-real-image-picker .media-slot .media-preview {
  min-height: 90px;
  aspect-ratio: 16 / 9;
}

.moment-real-image-picker .media-preview-empty {
  gap: 3px;
}

.moment-real-image-picker .media-preview-empty span {
  font-size: 11px;
}

.moment-real-image-picker .media-preview-empty strong {
  font-size: 13px;
}

.moment-real-image-picker .media-preview-empty small {
  font-size: 10px;
}

.moment-generated-panel {
  border-color: rgba(60, 60, 67, 0.12) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 246, 248, 0.62)) !important;
}

.moment-generated-panel .panel-head h3 {
  font-size: 18px;
  line-height: 1.2;
}

.moment-generated-panel #momentQuickResult {
  margin-top: 8px;
}

#tab-merchant-moments .metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

#tab-merchant-moments .metrics article {
  min-height: 62px;
  padding: 9px 7px;
  gap: 6px;
  border-color: rgba(60, 60, 67, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 246, 248, 0.68));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
}

#tab-merchant-moments .metrics span {
  font-size: 20px;
  line-height: 1.05;
}

#tab-merchant-moments .metrics small,
#tab-merchant-moments .metrics em {
  font-size: 12px;
  line-height: 1.25;
}

#tab-merchant-moments .item {
  padding: 11px;
  gap: 8px;
  border-color: rgba(60, 60, 67, 0.1);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: none;
}

#tab-merchant-moments label {
  gap: 7px;
}

.rewrite-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.82fr);
  align-items: stretch;
  gap: 10px;
}

#tab-merchant-moments .rewrite-toggle,
.rewrite-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text);
  cursor: pointer;
}

#tab-merchant-moments .rewrite-toggle input,
.rewrite-toggle input {
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  accent-color: #1d1d1f;
  box-shadow: none;
}

#tab-merchant-moments .rewrite-toggle span,
.rewrite-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

#tab-merchant-moments .rewrite-toggle strong,
.rewrite-toggle strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
}

#tab-merchant-moments .rewrite-toggle small,
.rewrite-toggle small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
}

.rewrite-media-row .moment-real-image-picker,
.rewrite-media-row .media-picker {
  min-width: 0;
}

.rewrite-media-row .moment-real-image-picker .media-slots {
  grid-template-columns: minmax(0, 1fr);
}

.rewrite-media-row .media-slot .media-preview {
  min-height: 72px;
  aspect-ratio: 16 / 9;
}

.rewrite-media-row .media-preview-empty {
  gap: 2px;
}

.rewrite-media-row .media-preview-empty strong {
  font-size: 12px;
}

.rewrite-media-row .media-preview-empty small {
  font-size: 9px;
  line-height: 1.2;
}

#tab-merchant-moments textarea {
  min-height: 108px;
  line-height: 1.55;
}

#tab-merchant-moments input[type="file"] {
  min-height: 44px;
}

#tab-merchant-moments .item .actions,
#tab-merchant-moments .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#tab-merchant-moments .item .actions .ghost,
#tab-merchant-moments .item .actions .link-button,
#tab-merchant-moments .actions .ghost,
#tab-merchant-moments .actions .link-button {
  min-height: 40px;
  width: 100%;
  justify-content: center;
}

.report-main-grid,
.report-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}

#tab-merchant-reports {
  display: grid;
  gap: 10px;
}

#tab-merchant-reports.hidden {
  display: none !important;
}

#tab-merchant-reports .report-metrics {
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 8px;
}

#tab-merchant-reports .metrics article {
  min-height: 100px;
  padding: 18px;
  gap: 6px;
  border-color: rgba(60, 60, 67, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 246, 248, 0.68));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
}

#tab-merchant-reports .metrics span {
  font-size: 28px;
  line-height: 1.05;
}

#tab-merchant-reports .metrics small,
#tab-merchant-reports .metrics em {
  font-size: 13px;
  line-height: 1.25;
}

#tab-merchant-reports .report-main-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 16px;
}

#tab-merchant-reports .report-event-grid {
  gap: 16px;
}

#tab-merchant-reports .report-tracking-panel {
  gap: 14px;
}

#tab-merchant-reports .report-tracking-panel .panel-head {
  align-items: start;
}

#tab-merchant-reports .report-tracking-panel .panel-head .hint {
  max-width: none;
  text-align: left;
}

#tab-merchant-reports .report-tracking-list {
  display: grid;
  gap: 10px;
}

#tab-merchant-reports .report-tracking-card {
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  padding: 12px;
  display: grid;
  gap: 10px;
}

#tab-merchant-reports .report-tracking-card.moment {
  border-color: rgba(180, 35, 24, 0.2);
}

#tab-merchant-reports .report-tracking-card.quote {
  border-color: rgba(0, 102, 204, 0.2);
}

#tab-merchant-reports .report-tracking-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

#tab-merchant-reports .type-badge {
  min-width: 44px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
  font-size: 12px;
  font-weight: 900;
}

#tab-merchant-reports .report-tracking-card.moment .type-badge {
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
}

#tab-merchant-reports .report-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

#tab-merchant-reports .report-stat-grid span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 4px;
}

#tab-merchant-reports .report-stat-grid small {
  color: var(--muted);
  font-size: 11px;
}

#tab-merchant-reports .report-stat-grid strong {
  font-size: 15px;
}

#tab-merchant-reports .panel {
  padding: 18px;
  gap: 14px;
  border-color: rgba(60, 60, 67, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(246, 246, 248, 0.62));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035);
}

#tab-merchant-reports .panel-head {
  gap: 12px;
  align-items: center;
}

#tab-merchant-reports .panel-head h3 {
  font-size: 18px;
  line-height: 1.2;
}

#tab-merchant-reports .panel-head .hint {
  max-width: 52%;
  font-size: 13px;
  line-height: 1.3;
  text-align: right;
}

#tab-merchant-reports .list {
  gap: 10px;
}

#tab-merchant-reports .report-main-grid > .panel > .list {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

#tab-merchant-reports .item {
  padding: 13px;
  gap: 8px;
  border-color: rgba(60, 60, 67, 0.1);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: none;
}

#tab-merchant-reports .item-head {
  gap: 12px;
  align-items: center;
}

#tab-merchant-reports .item-title {
  font-size: 15px;
  line-height: 1.25;
}

#tab-merchant-reports .badge {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

#tab-merchant-reports .item small,
#tab-merchant-reports .item p,
#tab-merchant-reports .item div:not(.item-head):not(.item-title):not(.tracked-customer-row):not(.tracked-customer-avatar):not(.tracked-customer-copy) {
  font-size: 13px;
  line-height: 1.5;
}

#tab-merchant-reports .tracked-customer-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

#tab-merchant-reports .tracked-customer-event {
  border: 0;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  background: transparent;
}

#tab-merchant-reports .tracked-customer-event:last-child {
  border-bottom: 0;
}

#tab-merchant-reports .tracked-customer-event summary {
  min-height: 52px;
  padding: 7px 2px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

#tab-merchant-reports .tracked-customer-event summary::-webkit-details-marker {
  display: none;
}

#tab-merchant-reports .tracked-customer-event summary:hover {
  background: rgba(118, 118, 128, 0.09);
}

#tab-merchant-reports .tracked-customer-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(242, 242, 247, 0.88);
}

#tab-merchant-reports .tracked-customer-fallback {
  display: inline-grid;
  place-items: center;
  color: #6e6e73;
  font-size: 12px;
  font-weight: 800;
}

#tab-merchant-reports .tracked-customer-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

#tab-merchant-reports .tracked-customer-copy strong {
  font-size: 15px;
  line-height: 1.2;
}

#tab-merchant-reports .tracked-customer-copy small {
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#tab-merchant-reports .tracked-customer-more {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#tab-merchant-reports .tracked-customer-event[open] .tracked-customer-more {
  color: var(--text);
}

#tab-merchant-reports .tracked-customer-detail {
  padding: 0 0 9px 48px;
}

#tab-merchant-reports .report-events-panel {
  gap: 12px;
}

#tab-merchant-reports .report-subhead {
  margin-bottom: 8px;
  gap: 10px;
}

#tab-merchant-reports .report-subhead h4 {
  font-size: 14px;
}

#tab-merchant-reports .report-subhead .hint {
  font-size: 12px;
}

#tab-merchant-reports .compact-list {
  max-height: none;
  gap: 7px;
}

#tab-merchant-reports pre {
  margin: 0;
  padding: 9px 10px;
  max-height: 140px;
  overflow: auto;
  border-radius: 7px;
  background: rgba(242, 242, 247, 0.58);
  color: #3a3a3c;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#tab-merchant-reports .merchant-report-page {
  width: min(960px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

#tab-merchant-reports .merchant-report-hero,
#tab-merchant-reports .tracking-panel,
#tab-merchant-reports .report-metrics article {
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

#tab-merchant-reports .merchant-report-hero {
  min-height: 112px;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
}

#tab-merchant-reports .report-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#tab-merchant-reports .report-toolbar .ghost,
#tab-merchant-reports .report-toolbar .link-button {
  min-height: 36px;
  padding: 0 12px;
  justify-content: center;
  white-space: nowrap;
}

#tab-merchant-reports .merchant-report-hero h1 {
  margin: 0;
  font-size: clamp(28px, 7vw, 46px);
  line-height: 1.05;
}

#tab-merchant-reports .merchant-report-hero p:not(.eyebrow) {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

#tab-merchant-reports .ghost.active {
  background: rgba(29, 29, 31, 0.9);
  color: #fff;
  border-color: rgba(29, 29, 31, 0.9);
}

#tab-merchant-reports .report-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

#tab-merchant-reports .report-metrics article {
  min-height: 76px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.9);
}

#tab-merchant-reports .report-metrics article span {
  font-size: 24px;
  line-height: 1;
  font-weight: 900;
}

#tab-merchant-reports .report-metrics article small,
#tab-merchant-reports .tracking-panel .panel-head small,
#tab-merchant-reports .tracking-panel .report-subhead small,
#tab-merchant-reports .tracking-card small,
#tab-merchant-reports .event small {
  color: var(--muted);
}

#tab-merchant-reports .tracking-panel {
  padding: 14px;
  display: grid;
  gap: 12px;
}

#tab-merchant-reports .tracking-panel .panel-head,
#tab-merchant-reports .tracking-panel .report-subhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

#tab-merchant-reports .tracking-panel .panel-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

#tab-merchant-reports .tracking-panel .report-subhead {
  margin: 2px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(60, 60, 67, 0.16);
}

#tab-merchant-reports .tracking-panel .report-subhead h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
}

#tab-merchant-reports .tracking-list,
#tab-merchant-reports .event-list {
  display: grid;
  gap: 10px;
}

#tab-merchant-reports .tracking-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#tab-merchant-reports .report-date-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

#tab-merchant-reports .report-date-filter > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

#tab-merchant-reports .report-date-filter input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
}

#tab-merchant-reports .tracking-card,
#tab-merchant-reports .event {
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.92);
  padding: 12px;
  display: grid;
  gap: 10px;
}

#tab-merchant-reports .tracking-card.moment {
  border-color: rgba(180, 35, 24, 0.2);
}

#tab-merchant-reports .tracking-card.quote {
  border-color: rgba(0, 102, 204, 0.2);
}

#tab-merchant-reports .tracking-head,
#tab-merchant-reports .event-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

#tab-merchant-reports .event-avatar {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
  font-size: 12px;
  font-weight: 900;
}

#tab-merchant-reports .tracking-card.moment .type-badge {
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
}

#tab-merchant-reports .stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

#tab-merchant-reports .stat-grid span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  gap: 4px;
}

#tab-merchant-reports .stat-grid small {
  font-size: 11px;
}

#tab-merchant-reports .stat-grid strong {
  font-size: 15px;
}

#tab-merchant-reports .event pre {
  margin: 0;
  padding: 0;
  max-height: none;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  color: #3a3a3c;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#tab-merchant-reports .event-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

#tab-merchant-reports .intent-badge {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

#tab-merchant-reports .intent-badge.high {
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
}

#tab-merchant-reports .intent-badge.medium {
  background: rgba(180, 108, 0, 0.12);
  color: #8a5300;
}

#tab-merchant-reports .intent-badge.low {
  background: rgba(60, 60, 67, 0.08);
  color: var(--muted);
}

.modal-open {
  overflow: hidden;
}

.report-detail-modal.hidden,
.quote-media-viewer-modal.hidden,
.platform-password-modal.hidden {
  display: none !important;
}

.report-detail-modal,
.quote-media-viewer-modal,
.platform-password-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.report-detail-backdrop,
.quote-media-viewer-backdrop,
.platform-password-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
}

.platform-password-modal {
  z-index: 96;
}

.platform-password-dialog {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
}

.platform-password-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.12);
}

.platform-password-head h3 {
  margin: 0 0 5px;
  font-size: 22px;
}

.platform-password-head small {
  color: var(--muted);
}

.platform-password-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.platform-password-form label {
  display: grid;
  gap: 8px;
}

.platform-password-form label span {
  font-weight: 700;
}

.platform-password-actions {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
}

.platform-password-actions button {
  width: 100%;
}

@media (max-width: 560px) {
  .platform-password-modal {
    padding: 12px;
  }

  .platform-password-dialog {
    border-radius: 16px;
  }

  .platform-password-head,
  .platform-password-form {
    padding: 18px;
  }
}

.report-detail-dialog {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(82vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.quote-media-viewer-modal {
  z-index: 92;
}

.quote-media-viewer-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(88vh, 820px);
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.quote-media-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.14);
}

.quote-media-viewer-head h3 {
  margin: 0;
  font-size: 18px;
}

.quote-media-viewer-body {
  min-height: 220px;
  max-height: calc(88vh - 64px);
  padding: 12px;
  display: grid;
  place-items: center;
  overflow: auto;
  -webkit-touch-callout: none;
  user-select: none;
}

.quote-media-viewer-body img,
.quote-media-viewer-body video {
  max-width: 100%;
  max-height: calc(88vh - 92px);
  object-fit: contain;
  border-radius: 10px;
  background: #000;
}

.quote-media-audio {
  width: min(460px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(242, 242, 247, 0.92);
}

.quote-media-audio audio {
  width: 100%;
}

.report-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.14);
}

.report-detail-head h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.report-detail-head small {
  color: var(--muted);
}

.report-detail-body {
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.report-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.report-detail-summary.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-detail-summary span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.82);
  display: grid;
  gap: 4px;
}

.report-detail-summary small {
  color: var(--muted);
  font-size: 11px;
}

.report-detail-summary strong {
  font-size: 15px;
}

.report-detail-profile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.report-detail-profile-actions small {
  color: var(--muted);
  line-height: 1.45;
}

.report-detail-event-list {
  display: grid;
  gap: 10px;
}

.report-detail-item {
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.report-detail-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.report-detail-item-head span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.report-detail-item dl {
  margin: 0;
  display: grid;
  gap: 7px;
}

.report-detail-item dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
}

.report-detail-item dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-detail-item dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.report-detail-item a {
  color: #0066cc;
  text-decoration: none;
}

.panel {
  padding: 18px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.form-grid.compact {
  gap: 10px;
}

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

.report-events-panel {
  gap: 12px;
}

.report-subhead {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.report-subhead h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.report-subhead .hint {
  font-size: 11px;
}

.compact-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
  gap: 7px;
}

.compact-list .item {
  padding: 10px;
  gap: 6px;
}

.compact-list .item-title {
  font-size: 13px;
}

.compact-list .item small,
.compact-list .item p,
.compact-list .item div {
  font-size: 12px;
  line-height: 1.45;
}

.item {
  padding: 13px;
  display: grid;
  gap: 8px;
}

.item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.quote-draft-line {
  gap: 10px;
}

.quote-line-price-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

#tab-merchant-quote-customer .quote-line-price-row,
#tab-merchant-quote-customer .quote-draft-total {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

#tab-merchant-quote-customer .quote-line-price-row label,
#tab-merchant-quote-customer .quote-line-price-row input {
  width: 100%;
  min-width: 0;
}

.quote-line-price-row label {
  display: grid;
  gap: 5px;
  min-width: 150px;
}

.quote-line-price-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quote-line-price-row input {
  width: 150px;
}

.quote-line-price-row strong,
.quote-draft-total strong {
  font-size: 16px;
}

.quote-draft-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.7);
}

#tab-merchant-quote-customer .quote-draft-total strong {
  font-size: 18px;
}

.quote-draft-total span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.item-title {
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(118, 118, 128, 0.16);
  border: 1px solid rgba(60, 60, 67, 0.12);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.awaiting_review,
.badge.starter,
.badge.pending {
  background: rgba(118, 118, 128, 0.14);
}

.badge.approved,
.badge.active,
.badge.pro,
.badge.owner {
  background: rgba(118, 118, 128, 0.18);
}

.badge.enterprise,
.badge.super_admin {
  background: rgba(118, 118, 128, 0.2);
}

.badge.needs_revision,
.badge.suspended,
.badge.disabled,
.badge.rejected {
  background: rgba(118, 118, 128, 0.22);
}

.badge.hot {
  background: rgba(217, 45, 32, 0.14);
  border-color: rgba(217, 45, 32, 0.22);
}

.badge.warm {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.24);
}

.badge.cold {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.2);
}

.badge.admin,
.badge.ops,
.badge.finance,
.badge.operator,
.badge.completed,
.badge.draft,
.badge.scheduled,
.badge.notified,
.badge.setup,
.badge.live {
  background: rgba(118, 118, 128, 0.16);
}

.badge.cancelled {
  background: rgba(255, 59, 48, 0.12);
  border-color: rgba(255, 59, 48, 0.22);
  color: #9f1d16;
}

pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 6px;
  color: #3a3a3c;
  line-height: 1.55;
}

.quote-mini-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quote-mini-media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(118, 118, 128, 0.12);
}

.quote-mini-media img,
.quote-mini-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.quote-mini-media.is-video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.quote-mini-media.is-video::before {
  content: "";
  position: absolute;
  left: calc(50% + 2px);
  top: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #1d1d1f;
}

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

.wechat-receiver-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.wechat-receiver-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #1d1d1f;
  font-size: 12px;
}

.wechat-receiver-chip img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

button.mini {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.actions select {
  width: auto;
  min-width: 132px;
  min-height: 38px;
}

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

.lead-funnel-step {
  min-height: 86px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  align-content: center;
  gap: 4px;
}

.lead-funnel-step strong {
  font-size: 26px;
  line-height: 1;
}

.lead-funnel-step span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.lead-system-douyin-panel {
  gap: 12px;
}

.douyin-workflow article {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  align-content: center;
  gap: 5px;
}

.douyin-workflow strong {
  color: #6e62d9;
  font-size: 18px;
  line-height: 1;
}

.douyin-workflow span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.douyin-account-form .actions {
  align-items: end;
}

.douyin-inline-account-form {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(160px, 1fr)
    minmax(260px, 1.6fr)
    minmax(180px, 1fr)
    auto;
  gap: 8px;
  align-items: end;
}

.douyin-inline-account-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.douyin-inline-account-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.douyin-inline-account-form input {
  min-height: 36px;
}

.douyin-inline-account-form .actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
}

.douyin-account-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.douyin-account-list .item {
  min-height: 100%;
}

.douyin-account-list .item pre {
  max-height: 128px;
  overflow: auto;
}

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

.douyin-import-form textarea {
  min-height: 150px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
}

.douyin-manual-lead-form {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-inline-lead-form {
  display: grid;
  grid-template-columns:
    minmax(118px, 0.8fr)
    minmax(112px, 0.8fr)
    minmax(112px, 0.8fr)
    minmax(112px, 0.8fr)
    minmax(118px, 0.8fr)
    minmax(150px, 1fr)
    minmax(150px, 1fr)
    minmax(150px, 0.9fr)
    auto;
  gap: 8px;
  align-items: end;
}

.douyin-inline-lead-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.douyin-inline-lead-form label span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.douyin-inline-lead-form input,
.douyin-inline-lead-form select {
  min-height: 36px;
}

.douyin-inline-lead-form .actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: end;
  justify-content: flex-end;
}

.douyin-chat-image-field input[type="file"] {
  min-height: 36px;
  padding: 6px;
  border: 1px dashed rgba(60, 60, 67, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-chat-image-field .hint {
  display: none;
}

.douyin-chat-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}

.douyin-chat-image-grid button {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(242, 242, 247, 0.8);
  cursor: pointer;
}

.douyin-chat-image-grid img,
.douyin-chat-image-grid video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.douyin-chat-image-grid button.is-video::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-40%, -50%);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.douyin-media-tile {
  display: grid;
  gap: 6px;
}

.douyin-chat-image-grid .douyin-media-delete {
  width: auto;
  aspect-ratio: auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 9px;
}

.douyin-chat-audio {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 10px;
  background: rgba(242, 242, 247, 0.8);
}

.douyin-chat-audio strong {
  font-size: 12px;
}

.douyin-chat-audio audio {
  width: 100%;
}

.amr-player {
  align-items: start;
}

.native-audio-player {
  align-items: start;
}

.native-audio-player audio {
  width: 100%;
}

.amr-player button {
  justify-self: start;
  min-height: 32px;
  padding: 0 14px;
}

.amr-player [data-amr-status] {
  color: var(--text-muted);
  font-size: 12px;
}

.douyin-daily-list {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.douyin-recruiter-stat-list {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 10px 0 12px;
}

.douyin-recruiter-stat-list article {
  min-height: 66px;
  padding: 10px;
}

.douyin-recruiter-stat-list strong {
  font-size: 18px;
  line-height: 1.15;
}

.douyin-recruiter-stat-list span {
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

.douyin-split {
  grid-template-columns: minmax(0, 1fr);
}

.douyin-recruiter-settings {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin: 10px 0 12px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-recruiter-settings label {
  margin: 0;
}

.douyin-recruiter-settings small {
  grid-column: 1 / -1;
  color: rgba(60, 60, 67, 0.62);
  font-size: 12px;
}

.douyin-recruiter-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.douyin-recruiter-item {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.douyin-recruiter-item strong,
.douyin-recruiter-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.douyin-recruiter-item span {
  margin-top: 2px;
  color: rgba(60, 60, 67, 0.56);
  font-size: 12px;
}

.douyin-recruiter-item .actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.douyin-recruiter-item .actions button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.douyin-lead-table-wrap {
  overflow: auto;
  border: 1px solid rgba(60, 60, 67, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-lead-table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.douyin-lead-table th,
.douyin-lead-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  text-align: left;
  vertical-align: top;
}

.douyin-lead-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(248, 248, 252, 0.96);
  color: rgba(60, 60, 67, 0.62);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.douyin-lead-table td strong,
.douyin-lead-table td span,
.douyin-lead-table td small {
  display: block;
  min-width: 0;
}

.douyin-lead-table td strong {
  color: #1d1d1f;
  font-size: 13px;
  line-height: 1.35;
}

.douyin-lead-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.douyin-chat-snippet {
  max-width: 260px;
  color: #3a3a3c;
  line-height: 1.45;
}

.douyin-track-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  padding: 7px;
  border-radius: 9px;
  background: rgba(0, 122, 255, 0.08);
}

.douyin-avatar-stack {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 132px;
}

.douyin-avatar-stack i {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-style: normal;
}

.douyin-avatar-stack img,
.douyin-avatar-stack span {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #1d1d1f;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.douyin-avatar-stack b {
  position: absolute;
  right: -4px;
  bottom: -4px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #1d1d1f;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  font-size: 9px;
  line-height: 14px;
  text-align: center;
}

.douyin-avatar-stack em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.douyin-track-box img,
.douyin-track-avatar {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #1d1d1f;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.douyin-track-box strong,
.douyin-track-box small {
  display: block;
  line-height: 1.35;
}

.douyin-track-box small {
  color: var(--muted);
  word-break: break-all;
}

.douyin-view-history {
  display: grid;
  gap: 8px;
}

.douyin-view-history article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-view-history img,
.douyin-view-history .douyin-track-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
}

.douyin-view-history strong,
.douyin-view-history span,
.douyin-view-history small {
  display: block;
  line-height: 1.35;
}

.douyin-view-history span,
.douyin-view-history small {
  color: var(--muted);
  word-break: break-all;
}

.douyin-intent {
  width: fit-content;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.douyin-intent.high {
  background: rgba(52, 199, 89, 0.14);
  color: #198038;
}

.douyin-intent.medium {
  background: rgba(255, 149, 0, 0.16);
  color: #9a5b00;
}

.douyin-intent.low {
  background: rgba(142, 142, 147, 0.14);
  color: #5f5f66;
}

.douyin-intent.pending {
  background: rgba(255, 59, 48, 0.14);
  color: #b42318;
}

.douyin-intent.contacted {
  background: rgba(52, 199, 89, 0.14);
  color: #198038;
}

.douyin-intent.invalid {
  background: rgba(142, 142, 147, 0.16);
  color: #5f5f66;
}

.douyin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.douyin-lead-edit-row td {
  padding: 12px;
  background: rgba(248, 248, 252, 0.78);
}

.douyin-lead-edit-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.douyin-lead-edit-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.douyin-lead-edit-head strong {
  font-size: 16px;
}

.douyin-lead-edit-head small {
  color: var(--muted);
}

.douyin-lead-edit-form label {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.douyin-lead-edit-form label.wide {
  grid-column: span 3;
}

.douyin-lead-edit-form label.full {
  grid-column: 1 / -1;
}

.douyin-lead-edit-form label span {
  color: rgba(60, 60, 67, 0.68);
  font-size: 12px;
  font-weight: 800;
}

.douyin-lead-edit-form input,
.douyin-lead-edit-form select,
.douyin-lead-edit-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  color: #1d1d1f;
  font: inherit;
  padding: 8px 10px;
  outline: none;
}

.douyin-lead-edit-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.douyin-lead-edit-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.douyin-cell-edit {
  min-width: 118px;
  display: grid;
  gap: 6px;
}

.douyin-cell-edit label {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.douyin-cell-edit label span {
  color: rgba(60, 60, 67, 0.64);
  font-size: 11px;
  font-weight: 800;
}

.douyin-cell-edit input,
.douyin-cell-edit select,
.douyin-cell-edit textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.94);
  color: #1d1d1f;
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 7px;
  outline: none;
}

.douyin-cell-edit textarea {
  min-height: 46px;
  max-height: 96px;
  resize: vertical;
}

.douyin-edit-actions {
  min-width: 84px;
}

.metrics.six.douyin-metrics {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  gap: 10px;
}

.metrics.six.douyin-metrics::-webkit-scrollbar {
  display: none;
}

.metrics.six.douyin-metrics article {
  flex: 0 0 96px;
  min-height: 76px;
  padding: 12px;
}

.metrics.six.douyin-metrics span {
  font-size: 22px;
  line-height: 1.12;
  word-break: break-word;
}

.metrics.six.douyin-metrics small {
  font-size: 12px;
}

.douyin-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.douyin-detail-summary span {
  min-height: 58px;
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(242, 242, 247, 0.82);
  display: grid;
  gap: 4px;
}

.douyin-detail-summary small {
  color: var(--muted);
  font-size: 11px;
}

.douyin-detail-summary strong {
  font-size: 15px;
}

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

.douyin-detail-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.douyin-detail-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.douyin-detail-grid dd {
  margin: 0;
  color: #1d1d1f;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.douyin-chat-card {
  padding: 12px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  display: grid;
  gap: 10px;
}

.douyin-chat-card.compact {
  background: rgba(248, 248, 252, 0.72);
}

.douyin-chat-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.douyin-chat-card-head small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.douyin-chat-card pre {
  max-height: 320px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1d1d1f;
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.douyin-import-history {
  display: grid;
  gap: 8px;
}

.douyin-import-history article {
  padding: 9px;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 4px;
}

.douyin-import-history span,
.douyin-import-history small {
  color: var(--muted);
}

.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: #3a3a3c;
  text-decoration: none;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.48);
}

.quote-card {
  grid-template-columns: 118px 1fr;
}

.quote-category-card {
  gap: 12px;
}

.quote-category-projects {
  display: grid;
  gap: 8px;
}

#tab-merchant-quote-categories .quote-category-projects {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.quote-position-group {
  display: grid;
  gap: 8px;
}

.quote-position-section {
  display: grid;
  gap: 8px;
}

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

.quote-position-title {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.14);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quote-category-project {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.44);
}

#tab-merchant-quote-categories .quote-category-project,
#tab-merchant-quote-projects .quote-category-project {
  grid-template-columns: 54px 1fr;
  gap: 8px;
  padding: 8px;
}

#tab-merchant-quote-categories .quote-category-project {
  grid-template-columns: 1fr;
  gap: 5px;
  padding: 6px;
  align-content: start;
}

#tab-merchant-quote-categories .quote-category-project .ghost,
#tab-merchant-quote-projects .quote-category-project .ghost {
  grid-column: 1 / -1;
  min-height: 36px;
  width: 100%;
}

#tab-merchant-quote-categories .quote-category-project .ghost {
  min-height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}

.quote-category-project .quote-thumb-wrap,
.quote-category-project .quote-thumb {
  width: 56px;
  height: 44px;
}

#tab-merchant-quote-categories .quote-category-project .quote-thumb-wrap,
#tab-merchant-quote-categories .quote-category-project .quote-thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

#tab-merchant-quote-categories .quote-category-project strong {
  font-size: 11px;
  line-height: 1.22;
}

#tab-merchant-quote-categories .quote-category-project small {
  font-size: 10px;
}

.quote-category-project .quote-thumb-wrap span {
  right: 3px;
  bottom: 3px;
  min-width: 22px;
  padding: 2px 5px;
  font-size: 10px;
}

#tab-merchant-quote-customer,
#tab-merchant-quote-categories,
#tab-merchant-quote-projects {
  width: min(100%, 860px);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}

#tab-merchant-quote-customer.hidden,
#tab-merchant-quote-categories.hidden,
#tab-merchant-quote-projects.hidden {
  display: none !important;
}

#tab-merchant-quote-customer .split,
#tab-merchant-quote-projects .split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#tab-merchant-quote-customer .panel,
#tab-merchant-quote-categories .panel,
#tab-merchant-quote-projects .panel {
  padding: 14px;
  gap: 12px;
  border-color: rgba(60, 60, 67, 0.12);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 246, 248, 0.68));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.035);
}

#tab-merchant-quote-customer .panel-head,
#tab-merchant-quote-categories .panel-head,
#tab-merchant-quote-projects .panel-head {
  min-height: auto;
  margin: 0 0 4px;
  gap: 8px;
  align-items: start;
}

#tab-merchant-quote-customer .panel-head h3,
#tab-merchant-quote-categories .panel-head h3,
#tab-merchant-quote-projects .panel-head h3 {
  font-size: 19px;
  line-height: 1.2;
}

#tab-merchant-quote-customer .panel-head .hint,
#tab-merchant-quote-categories .panel-head .hint,
#tab-merchant-quote-projects .panel-head .hint {
  max-width: none;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
}

#tab-merchant-quote-customer .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

#tab-merchant-quote-customer .panel-head > div {
  min-width: 0;
}

#tab-merchant-quote-customer .quote-sheet-head-submit {
  width: auto;
  min-width: 150px;
  min-height: 36px;
  padding: 8px 14px;
  white-space: nowrap;
}

#tab-merchant-quote-customer .form-grid,
#tab-merchant-quote-customer .form-grid.compact,
#tab-merchant-quote-projects .form-grid,
#tab-merchant-quote-projects .form-grid.compact {
  grid-template-columns: 1fr;
  gap: 9px;
}

#tab-merchant-quote-customer .quote-sheet-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

#tab-merchant-quote-customer .quote-sheet-fields .quote-title-field {
  grid-column: 1 / -1;
}

#tab-merchant-quote-customer .quote-sheet-fields label {
  gap: 4px;
  min-width: 0;
}

#tab-merchant-quote-customer .quote-sheet-fields span {
  font-size: 11px;
  line-height: 1.2;
}

#tab-merchant-quote-customer .quote-sheet-fields input,
#tab-merchant-quote-customer .quote-sheet-fields select {
  min-width: 0;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

#tab-merchant-quote-customer .form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#tab-merchant-quote-projects .quote-item-fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
}

#tab-merchant-quote-projects .quote-item-fields label,
#tab-merchant-quote-projects .quote-item-fields .media-picker {
  min-width: 0;
  gap: 4px;
}

#tab-merchant-quote-projects .quote-item-fields span,
#tab-merchant-quote-projects .quote-item-fields .media-picker > span {
  font-size: 11px;
  line-height: 1.2;
}

#tab-merchant-quote-projects .quote-item-fields input,
#tab-merchant-quote-projects .quote-item-fields textarea {
  min-height: 36px;
  padding: 7px 8px;
  font-size: 12px;
}

#tab-merchant-quote-projects .quote-item-fields textarea {
  height: 72px;
  min-height: 72px;
  resize: vertical;
}

#tab-merchant-quote-projects .quote-item-fields .quote-description-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

#tab-merchant-quote-projects .quote-item-fields .quote-description-field span {
  font-size: 13px;
  font-weight: 850;
}

#tab-merchant-quote-projects .quote-item-fields .quote-description-field textarea {
  height: 168px;
  min-height: 168px;
  padding: 10px 12px;
  line-height: 1.78;
  resize: vertical;
  background:
    linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(180deg, transparent 0, transparent 31px, rgba(60, 60, 67, 0.08) 32px);
}

#tab-merchant-quote-projects .form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#tab-merchant-quote-customer label,
#tab-merchant-quote-projects label {
  gap: 6px;
}

#tab-merchant-quote-customer input,
#tab-merchant-quote-customer select,
#tab-merchant-quote-projects input,
#tab-merchant-quote-projects select,
#tab-merchant-quote-projects textarea {
  min-height: 42px;
  border-radius: 10px;
  font-size: 14px;
}

#tab-merchant-quote-projects textarea {
  min-height: 118px;
  line-height: 1.55;
}

.quote-description-text {
  white-space: normal;
  line-height: 1.68;
}

.quote-description-text br {
  display: block;
  content: "";
  margin-top: 4px;
}

#tab-merchant-quote-customer .actions,
#tab-merchant-quote-projects .actions {
  grid-template-columns: 1fr;
  gap: 8px;
}

#tab-merchant-quote-customer .actions .primary,
#tab-merchant-quote-customer .actions .ghost,
#tab-merchant-quote-projects .actions .primary,
#tab-merchant-quote-projects .actions .ghost {
  width: 100%;
  min-height: 44px;
}

#tab-merchant-quote-customer .list,
#tab-merchant-quote-categories .list,
#tab-merchant-quote-projects .list {
  gap: 8px;
}

#tab-merchant-quote-customer .item,
#tab-merchant-quote-categories .item,
#tab-merchant-quote-projects .item {
  padding: 10px;
  gap: 7px;
  border-radius: 10px;
  box-shadow: none;
}

#tab-merchant-quote-customer .item-head,
#tab-merchant-quote-projects .item-head {
  display: grid;
  gap: 7px;
}

#tab-merchant-quote-customer .item .actions,
#tab-merchant-quote-projects .item .actions,
#tab-merchant-quote-categories .item .actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

#tab-merchant-quote-customer .item .actions .ghost,
#tab-merchant-quote-customer .item .actions .link-button,
#tab-merchant-quote-projects .item .actions .ghost,
#tab-merchant-quote-projects .item .actions .link-button,
#tab-merchant-quote-categories .item .actions .ghost,
#tab-merchant-quote-categories .item .actions .link-button {
  width: 100%;
  min-height: 38px;
  justify-content: center;
}

#tab-merchant-quote-customer .quote-sheet-card > .actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

#tab-merchant-quote-customer .quote-sheet-card {
  padding: 7px;
  gap: 5px;
}

#tab-merchant-quote-customer .quote-sheet-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

#tab-merchant-quote-customer .quote-sheet-line > span,
#tab-merchant-quote-customer .quote-sheet-line > strong,
#tab-merchant-quote-customer .quote-sheet-line > .status {
  flex: 0 0 auto;
}

#tab-merchant-quote-customer .quote-sheet-inline-details {
  display: grid;
  gap: 6px;
}

#tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-details {
  padding: 8px;
  gap: 7px;
  background: rgba(255, 255, 255, 0.62);
}

#tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item {
  grid-template-columns: 62px minmax(0, 1fr);
  padding: 7px;
  gap: 8px;
}

#tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb,
#tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb-wrap {
  width: 62px;
  height: 52px;
}

#tab-merchant-quote-customer .quote-sheet-card .item-head {
  gap: 5px;
}

#tab-merchant-quote-customer .quote-sheet-card .item-title {
  font-size: 13px;
  line-height: 1.2;
}

#tab-merchant-quote-customer .quote-sheet-card small {
  font-size: 11px;
  line-height: 1.25;
}

#tab-merchant-quote-customer .quote-sheet-total {
  font-size: 16px;
  line-height: 1.1;
}

#tab-merchant-quote-customer .quote-sheet-card > .actions .ghost,
#tab-merchant-quote-customer .quote-sheet-card > .actions .primary,
#tab-merchant-quote-customer .quote-sheet-card > .actions .link-button {
  width: 100%;
  min-height: 32px;
  padding: 5px 6px;
  font-size: 12px;
  justify-content: center;
}

#tab-merchant-quote-sheets {
  width: min(100%, 760px);
  margin-inline: auto;
}

#tab-merchant-quote-sheets > .panel {
  padding: 12px;
}

#tab-merchant-quote-sheets .panel-head {
  align-items: center;
}

#tab-merchant-quote-sheets .form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#tab-merchant-quote-sheets .item .actions,
#tab-merchant-quote-sheets .quote-sheet-card > .actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

#tab-merchant-quote-sheets .quote-sheet-card {
  padding: 6px;
  gap: 4px;
}

#tab-merchant-quote-sheets .quote-sheet-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-bottom: 2px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

#tab-merchant-quote-sheets .quote-sheet-line > span,
#tab-merchant-quote-sheets .quote-sheet-line > strong,
#tab-merchant-quote-sheets .quote-sheet-line > .status {
  flex: 0 0 auto;
}

#tab-merchant-quote-sheets .quote-sheet-inline-details {
  display: grid;
  gap: 5px;
}

#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-details {
  padding: 6px;
  gap: 6px;
  background: rgba(255, 255, 255, 0.62);
}

#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item {
  grid-template-columns: 52px minmax(0, 1fr);
  padding: 6px;
  gap: 6px;
}

#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb,
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb-wrap {
  width: 52px;
  height: 44px;
}

#tab-merchant-quote-sheets .quote-sheet-card .item-title {
  font-size: 12px;
  line-height: 1.2;
}

#tab-merchant-quote-sheets .quote-sheet-card small {
  font-size: 10px;
  line-height: 1.25;
}

#tab-merchant-quote-sheets .quote-sheet-total {
  font-size: 15px;
  line-height: 1.1;
}

#tab-merchant-quote-sheets .quote-sheet-card > .actions .ghost,
#tab-merchant-quote-sheets .quote-sheet-card > .actions .primary,
#tab-merchant-quote-sheets .quote-sheet-card > .actions .link-button {
  width: 100%;
  min-height: 28px;
  padding: 4px 3px;
  font-size: 10px;
  justify-content: center;
}

.quote-detail-body {
  grid-template-columns: 1fr;
}

.quote-detail-body {
  margin-bottom: 12px;
}

.quote-detail-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quote-detail-actions .ghost,
.quote-detail-actions .link-button {
  width: 100%;
  justify-content: center;
}

.quote-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
}

#tab-merchant-quote-customer .quote-choice-grid,
#tab-merchant-quote-customer .quote-choice-section-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.quote-choice-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.quote-choice-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 10px;
}

.quote-choice {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-areas:
    "media text"
    "media state";
  gap: 8px 10px;
  min-height: 92px;
  padding: 9px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
  color: var(--text);
}

#tab-merchant-quote-customer .quote-choice {
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "text"
    "state";
  min-height: 148px;
  padding: 6px;
  gap: 5px;
  align-content: start;
}

#tab-merchant-quote-customer .quote-choice .quote-thumb,
#tab-merchant-quote-customer .quote-choice .quote-thumb-wrap {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}

#tab-merchant-quote-customer .quote-choice strong {
  font-size: 11px;
  line-height: 1.22;
}

#tab-merchant-quote-customer .quote-choice small,
#tab-merchant-quote-customer .quote-choice i {
  font-size: 10px;
}

#tab-merchant-quote-customer .quote-choice i {
  min-height: 20px;
  padding: 2px 5px;
}

.quote-choice .quote-thumb {
  grid-area: media;
  width: 72px;
  height: 72px;
}

.quote-choice .quote-thumb-wrap {
  grid-area: media;
  width: 72px;
  height: 72px;
}

.quote-choice span {
  grid-area: text;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.quote-choice strong {
  font-size: 13px;
  line-height: 1.35;
}

.quote-choice small,
.quote-choice i {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.quote-choice i {
  grid-area: state;
  justify-self: start;
  align-self: end;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(118, 118, 128, 0.14);
}

.quote-choice.selected {
  border-color: rgba(60, 60, 67, 0.5);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 0 0 2px rgba(60, 60, 67, 0.12);
}

.quote-thumb {
  width: 118px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(118, 118, 128, 0.14);
}

.quote-thumb-wrap {
  position: relative;
  width: 118px;
  height: 88px;
}

.quote-thumb-wrap .quote-thumb {
  width: 100%;
  height: 100%;
}

.quote-thumb-wrap.is-video::before,
.quote-media-strip button.is-video::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.quote-thumb-wrap.is-video::after,
.quote-media-strip button.is-video::after {
  content: "";
  position: absolute;
  left: calc(50% + 2px);
  top: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #1d1d1f;
}

.quote-thumb-wrap span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 4;
  min-width: 28px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(29, 29, 31, 0.72);
  color: #fff;
  font-size: 12px;
  text-align: center;
}

.quote-media-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.quote-media-strip button {
  position: relative;
  width: 54px;
  padding: 0;
  border: 0;
  color: var(--muted);
  text-decoration: none;
  display: block;
  background: transparent;
  cursor: pointer;
}

.quote-media-strip button.is-video::before {
  width: 24px;
  height: 24px;
}

.quote-media-strip button.is-video::after {
  border-top-width: 6px;
  border-bottom-width: 6px;
  border-left-width: 9px;
}

.quote-media-strip img,
.quote-media-strip video {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(118, 118, 128, 0.14);
}

.quote-sheet-body {
  display: grid;
  grid-template-columns: 1fr 172px;
  gap: 12px;
  align-items: start;
}

.quote-sheet-details {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.quote-sheet-details-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.quote-sheet-details-head small {
  color: var(--muted);
  font-weight: 700;
}

.quote-sheet-detail-list {
  display: grid;
  gap: 8px;
}

.quote-sheet-detail-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
}

.quote-sheet-detail-item .quote-thumb,
.quote-sheet-detail-item .quote-thumb-wrap {
  width: 72px;
  height: 58px;
}

.quote-qr-card {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.quote-qr {
  width: 142px;
  height: 210px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.media-picker {
  display: grid;
  gap: 10px;
}

#tab-merchant-quote-projects .media-picker {
  gap: 7px;
}

.media-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.media-preview {
  width: 100%;
  min-height: 178px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.media-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

#tab-merchant-quote-projects .media-slots {
  grid-template-columns: 1fr;
  gap: 8px;
}

.media-slot {
  display: block;
  min-width: 0;
}

.media-slot .media-preview {
  min-height: 150px;
  aspect-ratio: 4 / 3;
}

#tab-merchant-quote-projects .media-slot .media-preview {
  min-height: 66px;
  aspect-ratio: 16 / 9;
}

#tab-merchant-quote-projects .quote-item-fields .media-slot .media-preview {
  min-height: 66px;
  border-radius: 10px;
}

#tab-merchant-quote-projects .quote-item-fields .media-preview-empty {
  gap: 2px;
}

#tab-merchant-quote-projects .quote-item-fields .media-preview-empty strong {
  font-size: 12px;
}

#tab-merchant-quote-projects .quote-item-fields .media-preview-empty small {
  font-size: 9px;
}

.media-add-button {
  justify-self: start;
}

#tab-merchant-quote-projects .media-add-button {
  width: 100%;
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}

#tab-merchant-quote-projects .quote-item-fields #quoteMediaUploadHint {
  font-size: 10px;
  line-height: 1.25;
}

.media-preview.has-media {
  position: relative;
  aspect-ratio: auto;
  grid-template-columns: 1fr;
  align-items: stretch;
  place-items: stretch;
  gap: 8px;
  padding: 8px;
}

.media-preview-tile {
  display: grid;
  grid-template-rows: 108px;
  gap: 5px;
  min-width: 0;
}

.media-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  grid-auto-rows: 72px;
  grid-template-rows: none;
  width: 100%;
}

#tab-merchant-quote-projects .media-preview-grid {
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  grid-auto-rows: 34px;
}

.media-remove-button {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 29, 31, 0.76);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.media-remove-button:hover {
  background: rgba(255, 59, 48, 0.92);
}

.media-picker:hover .media-preview {
  border-color: rgba(60, 60, 67, 0.46);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.media-preview-empty {
  display: grid;
  gap: 6px;
  text-align: center;
}

.media-preview-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.media-preview-empty strong {
  color: var(--text);
  font-size: 15px;
}

.media-preview img,
.media-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: rgba(118, 118, 128, 0.14);
}

.media-picker > small {
  color: var(--muted);
  line-height: 1.45;
}

.quote-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check input {
  width: auto;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(460px, calc(100vw - 36px));
  background: rgba(29, 29, 31, 0.86);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

@media (max-width: 1120px) {
  .metrics.six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tab-merchant-reports .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tab-merchant-reports .report-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metrics.four,
  #tab-merchant-overview .merchant-overview-metrics,
  .merchant-ops-grid,
  .form-grid,
  .douyin-account-list,
  .quote-card,
  .quote-sheet-body,
  .lead-funnel,
  .douyin-workflow,
  .report-main-grid,
  .report-event-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .merchant-architecture-layers {
    grid-template-columns: 1fr;
  }

  .quote-qr {
    width: 150px;
    height: 222px;
  }
}

@media (max-width: 980px) {
  .login-split {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .login-view[data-view="login"] {
    align-items: center;
    padding: 28px;
  }

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

  .login-panel,
  .register-panel {
    width: min(460px, 100%);
  }

  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  nav {
    display: flex;
    gap: 12px;
    overflow-x: auto;
  }

  .nav-group {
    min-width: 220px;
  }

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

  #tab-merchant-reports .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-reports .report-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .merchant-architecture-title,
  .merchant-architecture-group {
    grid-template-columns: 1fr;
  }

  .merchant-architecture-rail {
    min-height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    justify-content: start;
    text-align: left;
  }

  .merchant-architecture-chipgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-overview .merchant-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .moment-agent-flow,
  .moment-agent-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .moment-agent-grid article {
    padding: 7px 4px;
    gap: 4px;
  }

  .moment-agent-grid span {
    font-size: 10px;
  }

  .moment-agent-grid strong {
    font-size: 12px;
  }

  .moment-agent-grid p {
    font-size: 10px;
    line-height: 1.22;
  }

  .moment-agent-grid .ghost {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 11px;
  }
}

@media (max-width: 620px) {
  .login-view {
    padding: 16px;
  }

  .login-view[data-view="login"] .login-panel {
    width: min(420px, 100%);
    min-height: auto;
    padding: 28px;
  }

  .login-view[data-view="login"] .login-brand-title {
    font-size: 28px;
  }

  .login-panel,
  .register-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .merchant-architecture-board {
    padding: 10px;
    border-radius: 14px;
  }

  .merchant-architecture-title {
    padding: 14px;
  }

  .merchant-architecture-title h2 {
    font-size: 22px;
  }

  .merchant-architecture-layer {
    padding: 10px;
    border-radius: 14px;
  }

  .merchant-architecture-layer h3 {
    min-height: 38px;
    font-size: 18px;
  }

  .merchant-architecture-chipgrid,
  .merchant-architecture-layer:not(.wide) .merchant-architecture-chipgrid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .merchant-architecture-chipgrid button {
    min-height: 40px;
    font-size: 14px;
  }

  #tab-merchant-overview .merchant-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #tab-merchant-overview .merchant-overview-metrics article {
    min-height: 72px;
    padding: 12px;
    border-radius: 13px;
  }

  #tab-merchant-overview .merchant-overview-metrics span {
    font-size: 22px;
  }

  .merchant-operation-panel {
    padding: 12px;
    border-radius: 14px;
  }

  .merchant-operation-panel .panel-head {
    margin: 0 0 8px;
    padding: 10px;
  }

  .merchant-operation-panel .panel-head h3 {
    font-size: 18px;
  }

  .moment-agent-system {
    padding: 12px;
    border-radius: 14px;
  }

  .moment-agent-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 10px;
    gap: 8px;
  }

  .moment-agent-hero h2 {
    font-size: 20px;
  }

  .moment-agent-hero p {
    font-size: 12px;
    line-height: 1.42;
  }

  .moment-agent-score {
    min-height: 56px;
  }

  .moment-agent-flow,
  .moment-agent-grid {
    gap: 7px;
  }

  .moment-agent-flow {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .moment-agent-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .moment-agent-flow button {
    min-height: 44px;
    padding: 6px 3px;
  }

  .moment-agent-flow small {
    font-size: 10px;
  }

  .moment-agent-flow strong {
    font-size: 11px;
    line-height: 1.15;
  }

  .moment-agent-grid article {
    padding: 7px 4px;
    gap: 4px;
  }

  .moment-agent-grid span {
    font-size: 10px;
  }

  .moment-agent-grid strong {
    font-size: 12px;
  }

  .moment-agent-grid p {
    font-size: 10px;
    line-height: 1.22;
  }

  .moment-agent-grid .ghost {
    min-height: 28px;
    padding: 4px 5px;
    font-size: 11px;
  }

  #tab-merchant-moments .metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #tab-merchant-moments .metrics article {
    min-height: 54px;
    padding: 7px 4px;
  }

  #tab-merchant-moments .metrics span {
    font-size: 17px;
  }

  #tab-merchant-moments .metrics small,
  #tab-merchant-moments .metrics em {
    font-size: 10px;
  }

  #tab-merchant-moments .panel-head {
    margin: 0 0 8px;
    padding: 0;
  }

  #tab-merchant-moments {
    gap: 8px;
  }

  #tab-merchant-moments > .panel,
  #tab-merchant-moments .split > .panel {
    padding: 12px;
    border-radius: 14px;
  }

  #tab-merchant-moments .item .actions,
  #tab-merchant-moments .actions {
    grid-template-columns: 1fr;
  }

  .login-brand-title {
    padding: 14px 10px 12px;
    font-size: 30px;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px 10px 8px;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(60, 60, 67, 0.12);
  }

  .sidebar > .stack {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand .mark {
    width: 34px;
    height: 34px;
    font-size: 13px;
  }

  .brand > div {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    display: block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }

  .account-card {
    padding: 7px 8px;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) 26px;
  }

  .account-menu-button {
    width: 26px;
    height: 26px;
  }

  nav {
    display: flex;
    gap: 8px;
    padding-bottom: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar {
    display: none;
  }

  .nav-group {
    display: contents;
  }

  .nav-label {
    display: none;
  }

  .nav-section {
    display: flex;
    flex: 0 0 auto;
    gap: 6px;
  }

  .nav,
  .nav-parent,
  .sub-nav {
    width: auto;
    min-height: 31px;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .sub-nav {
    padding-left: 18px;
  }

  .main {
    padding: 10px;
    gap: 10px;
  }

  .topbar {
    min-height: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .topbar .eyebrow,
  .topbar .hint {
    display: none;
  }

  .topbar h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
  }

  .toolbar {
    width: 100%;
  }

  #tenantSwitcher {
    min-width: 0;
    width: 100%;
  }

  .metrics.six,
  .metrics.four {
    grid-template-columns: 1fr;
  }

  .metrics.six.douyin-metrics {
    gap: 5px;
  }

  .douyin-recruiter-stat-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .douyin-recruiter-stat-list article {
    min-height: 54px;
    padding: 7px 5px;
  }

  .douyin-recruiter-settings {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .douyin-recruiter-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics.six.douyin-metrics article {
    flex-basis: 58px;
    min-height: 58px;
    padding: 7px 3px;
  }

  .metrics.six.douyin-metrics span {
    font-size: 14px;
  }

  .metrics.six.douyin-metrics small {
    font-size: 10px;
    line-height: 1.15;
  }

  #tab-merchant-reports {
    gap: 8px;
  }

  #tab-merchant-reports .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  #tab-merchant-reports .metrics article {
    min-height: 70px;
    padding: 10px;
    gap: 3px;
  }

  #tab-merchant-reports .metrics span {
    font-size: 20px;
  }

  #tab-merchant-reports .metrics small,
  #tab-merchant-reports .metrics em {
    font-size: 11px;
  }

  #tab-merchant-reports .report-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #tab-merchant-reports .report-toolbar .ghost,
  #tab-merchant-reports .report-toolbar .link-button {
    width: 100%;
    min-height: 34px;
    padding: 0 8px;
    justify-content: center;
    font-size: 12px;
    white-space: nowrap;
  }

  #tab-merchant-reports .panel {
    padding: 12px;
    gap: 10px;
  }

  #tab-merchant-reports .panel-head {
    gap: 4px;
  }

  #tab-merchant-reports .panel-head h3 {
    font-size: 16px;
  }

  #tab-merchant-reports #reportUpdatedAt {
    font-size: 11px;
  }

  #tab-merchant-reports .report-tracking-list {
    gap: 8px;
  }

  #tab-merchant-reports .report-tracking-card {
    padding: 10px;
    gap: 8px;
  }

  #tab-merchant-reports .report-tracking-head {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }

  #tab-merchant-reports .type-badge {
    min-width: 38px;
    height: 24px;
    padding: 0 7px;
    font-size: 11px;
  }

  #tab-merchant-reports .report-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  #tab-merchant-reports .report-stat-grid span {
    min-height: 48px;
    padding: 7px;
    gap: 2px;
  }

  #tab-merchant-reports .report-stat-grid small {
    font-size: 10px;
  }

  #tab-merchant-reports .report-stat-grid strong {
    font-size: 13px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  #tab-merchant-reports .panel-head {
    align-items: start;
    flex-direction: column;
  }

  #tab-merchant-reports .panel-head .hint {
    max-width: 100%;
    text-align: left;
  }

  #tab-merchant-reports .report-subhead {
    margin-bottom: 0;
    align-items: start;
    flex-direction: column;
    gap: 2px;
  }

  #tab-merchant-reports .report-subhead h4 {
    font-size: 13px;
  }

  #tab-merchant-reports .report-subhead .hint {
    font-size: 11px;
  }

  #tab-merchant-reports .compact-list {
    gap: 4px;
    padding-right: 0;
  }

  #tab-merchant-reports .tracked-customer-row {
    grid-template-columns: 34px minmax(0, 1fr) 28px;
    gap: 8px;
  }

  #tab-merchant-reports .tracked-customer-event summary {
    min-height: 46px;
    padding: 6px 0;
  }

  #tab-merchant-reports .tracked-customer-avatar {
    width: 34px;
    height: 34px;
  }

  #tab-merchant-reports .tracked-customer-copy {
    gap: 2px;
  }

  #tab-merchant-reports .tracked-customer-copy .item-title {
    font-size: 14px;
  }

  #tab-merchant-reports .tracked-customer-copy small {
    font-size: 11px;
  }

  #tab-merchant-reports .tracked-customer-more {
    font-size: 11px;
    text-align: right;
  }

  #tab-merchant-reports .tracked-customer-detail {
    padding: 0 0 8px;
  }

  #tab-merchant-reports pre {
    max-height: 180px;
    padding: 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  h1 {
    font-size: 24px;
  }

  .quote-line-price-row,
  .quote-draft-total {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-line-price-row label,
  .quote-line-price-row input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 380px) {
  #tab-merchant-reports .report-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  #tab-merchant-reports .report-metrics,
  #tab-merchant-reports .report-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  #tab-merchant-reports .merchant-report-page {
    width: 100%;
  }

  #tab-merchant-reports .merchant-report-hero,
  #tab-merchant-reports .tracking-panel .panel-head,
  #tab-merchant-reports .tracking-panel .report-subhead {
    display: grid;
    align-items: start;
  }

  #tab-merchant-reports .report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #tab-merchant-reports .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #tab-merchant-quote-customer,
  #tab-merchant-quote-categories,
  #tab-merchant-quote-projects {
    gap: 8px;
  }

  #tab-merchant-quote-customer .panel,
  #tab-merchant-quote-categories .panel,
  #tab-merchant-quote-projects .panel {
    padding: 12px;
    border-radius: 14px;
  }

  #tab-merchant-quote-customer .panel-head h3,
  #tab-merchant-quote-categories .panel-head h3,
  #tab-merchant-quote-projects .panel-head h3 {
    font-size: 18px;
  }

  #tab-merchant-quote-customer .quote-sheet-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  #tab-merchant-quote-customer .quote-sheet-fields span {
    font-size: 10px;
  }

  #tab-merchant-quote-customer .quote-sheet-fields input,
  #tab-merchant-quote-customer .quote-sheet-fields select {
    min-height: 32px;
    padding: 5px 4px;
    font-size: 10px;
  }

  #tab-merchant-quote-customer .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  #tab-merchant-quote-projects .quote-item-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #tab-merchant-quote-projects .quote-item-fields span,
  #tab-merchant-quote-projects .quote-item-fields .media-picker > span {
    font-size: 11px;
    font-weight: 750;
  }

  #tab-merchant-quote-projects .quote-item-fields input,
  #tab-merchant-quote-projects .quote-item-fields textarea {
    min-height: 38px;
    padding: 7px 8px;
    font-size: 12px;
  }

  #tab-merchant-quote-projects .quote-item-fields textarea {
    height: 62px;
    min-height: 62px;
  }

  #tab-merchant-quote-projects .quote-item-fields .quote-description-field {
    grid-column: 1 / -1;
    padding: 8px;
  }

  #tab-merchant-quote-projects .quote-item-fields .quote-description-field textarea {
    height: 150px;
    min-height: 150px;
    padding: 9px 10px;
    font-size: 12px;
    line-height: 1.75;
  }

  #tab-merchant-quote-projects .quote-item-fields .media-picker {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(60, 60, 67, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
  }

  #tab-merchant-quote-projects .media-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #tab-merchant-quote-projects .quote-item-fields .media-slot .media-preview {
    min-height: 86px;
    aspect-ratio: 1;
  }

  #tab-merchant-quote-projects .form-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-quote-customer .quote-choice-grid,
  #tab-merchant-quote-customer .quote-choice-section-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }

  #tab-merchant-quote-customer .item .actions,
  #tab-merchant-quote-projects .item .actions,
  #tab-merchant-quote-categories .item .actions {
    grid-template-columns: 1fr;
  }

  #tab-merchant-quote-customer .quote-sheet-card > .actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  #tab-merchant-quote-customer .quote-sheet-card {
    padding: 6px;
    gap: 4px;
  }

  #tab-merchant-quote-customer .quote-sheet-line {
    gap: 6px;
    padding-bottom: 2px;
  }

  #tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-details {
    padding: 6px;
  }

  #tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 6px;
    gap: 6px;
  }

  #tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb,
  #tab-merchant-quote-customer .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb-wrap {
    width: 52px;
    height: 44px;
  }

  #tab-merchant-quote-customer .quote-sheet-card .item-title {
    font-size: 12px;
  }

  #tab-merchant-quote-customer .quote-sheet-total {
    font-size: 15px;
  }

  #tab-merchant-quote-customer .quote-sheet-card > .actions .ghost,
  #tab-merchant-quote-customer .quote-sheet-card > .actions .primary,
  #tab-merchant-quote-customer .quote-sheet-card > .actions .link-button {
    min-height: 28px;
    padding: 4px 3px;
    font-size: 10px;
  }

  #tab-merchant-quote-categories .quote-category-projects {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
  }

  #tab-merchant-quote-categories .quote-category-project {
    padding: 4px;
    gap: 4px;
  }

  #tab-merchant-quote-categories .quote-category-project strong {
    font-size: 10px;
  }

  #tab-merchant-quote-categories .quote-category-project small,
  #tab-merchant-quote-categories .quote-category-project .ghost {
    font-size: 9px;
  }

  #tab-merchant-quote-categories .quote-category-project .ghost {
    min-height: 24px;
    padding: 2px 4px;
  }

  #tab-merchant-quote-customer .quote-choice {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "text"
      "state";
    min-height: 126px;
    padding: 4px;
  }

  #tab-merchant-quote-customer .quote-choice .quote-thumb,
  #tab-merchant-quote-customer .quote-choice .quote-thumb-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  #tab-merchant-quote-customer .quote-choice strong {
    font-size: 10px;
  }

  #tab-merchant-quote-customer .quote-choice small,
  #tab-merchant-quote-customer .quote-choice i {
    font-size: 9px;
  }

  #tab-merchant-quote-customer .quote-choice i {
    min-height: 18px;
    padding: 1px 4px;
  }

  #tab-merchant-quote-projects .quote-card {
    grid-template-columns: 1fr;
  }

  #tab-merchant-quote-projects .quote-card > .quote-thumb,
  #tab-merchant-quote-projects .quote-card > .quote-thumb-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  #tab-merchant-quote-projects .quote-description-text {
    font-size: 12px;
    line-height: 1.62;
  }

  #tab-merchant-reports .merchant-report-hero {
    min-height: auto;
    padding: 14px;
    display: grid;
  }

  #tab-merchant-reports .merchant-report-hero h1 {
    font-size: 30px;
  }

  #tab-merchant-reports .report-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-reports .report-metrics article {
    min-height: 66px;
    padding: 10px;
  }

  #tab-merchant-reports .report-metrics article span {
    font-size: 21px;
  }

  #tab-merchant-reports .tracking-panel {
    padding: 12px;
  }

  #tab-merchant-reports .tracking-card,
  #tab-merchant-reports .event {
    padding: 11px;
  }

  #tab-merchant-reports .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-reports .tracking-list {
    grid-template-columns: 1fr;
  }

  #tab-merchant-reports .report-date-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #tab-merchant-reports .report-date-filter > span,
  #tab-merchant-reports .report-date-filter label,
  #tab-merchant-reports .report-date-filter input,
  #tab-merchant-reports .report-date-filter .ghost {
    width: 100%;
  }

  .report-detail-modal {
    align-items: end;
    padding: 10px;
  }

  .report-detail-dialog {
    max-height: 88vh;
    border-radius: 12px;
  }

  .report-detail-head {
    padding: 12px;
  }

  .report-detail-body {
    padding: 12px;
  }

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

  .report-detail-summary.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-detail-profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .report-detail-item dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

@media (max-width: 760px) {
  .douyin-lead-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .douyin-lead-table {
    min-width: 0;
    display: block;
  }

  .douyin-lead-table thead {
    display: none;
  }

  .douyin-lead-table tbody {
    display: grid;
    gap: 8px;
  }

  .douyin-lead-table tr {
    padding: 9px;
    border: 1px solid rgba(60, 60, 67, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.05);
    display: grid;
    gap: 5px;
  }

  .douyin-lead-table td {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
    border-bottom: 0;
    align-items: start;
  }

  .douyin-lead-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .douyin-lead-table td[data-label="操作"] {
    grid-template-columns: 1fr;
  }

  .douyin-lead-table td[data-label="操作"]::before {
    display: none;
  }

  .douyin-row-actions {
    justify-content: flex-end;
  }

  .douyin-lead-edit-row td {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
    padding: 3px 0;
  }

  .douyin-lead-edit-row td::before {
    display: block;
  }

  .douyin-cell-edit {
    gap: 8px;
  }

  .douyin-edit-actions {
    justify-content: stretch;
  }

  .douyin-edit-actions button {
    flex: 1;
  }

  .douyin-chat-snippet {
    max-width: none;
  }

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

  .douyin-detail-grid {
    grid-template-columns: 1fr;
  }

  .douyin-inline-lead-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .douyin-inline-account-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .douyin-inline-account-form .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .douyin-inline-account-form .actions button {
    flex: 1;
  }

  .douyin-inline-lead-form .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .douyin-inline-lead-form .actions button {
    flex: 1;
  }

  .douyin-chat-card-head {
    align-items: start;
    flex-direction: column;
  }

  .douyin-chat-card-head small {
    text-align: left;
  }

  .douyin-chat-card pre {
    max-height: 240px;
  }
}
.quote-item-ai-result{margin:0 0 16px;padding:14px;border:1px solid #d2d2d7;border-radius:12px;background:#f8f8fa}.quote-item-ai-result pre{max-height:320px;margin:10px 0;padding:12px;border-radius:10px;background:#fff;overflow:auto;white-space:pre-wrap;word-break:break-word;font:13px/1.65 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}.quote-item-ai-result .actions{margin-top:10px}

/* Compact quote list: numbered cards and content-width actions. */
#tab-merchant-quote-sheets .quote-sheet-card{padding:5px;gap:3px;border-radius:10px}
#tab-merchant-quote-sheets .quote-sheet-line{gap:5px;padding-bottom:0}
#tab-merchant-quote-sheets .quote-sheet-sequence{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:#1d1d1f;color:#fff;font-size:11px;font-weight:800;line-height:1}
#tab-merchant-quote-sheets .quote-sheet-inline-details{gap:3px}
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-details{padding:4px;gap:4px}
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item{grid-template-columns:44px minmax(0,1fr);padding:4px;gap:5px}
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb,
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-sheet-detail-item .quote-thumb-wrap{width:44px;height:36px}
#tab-merchant-quote-sheets .quote-sheet-inline-details .quote-description-text{display:-webkit-box;margin:2px 0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
#tab-merchant-quote-sheets .quote-sheet-card>.actions{display:flex;grid-template-columns:none;flex-wrap:wrap;gap:4px;justify-content:flex-start}
#tab-merchant-quote-sheets .quote-sheet-card>.actions .ghost,
#tab-merchant-quote-sheets .quote-sheet-card>.actions .primary,
#tab-merchant-quote-sheets .quote-sheet-card>.actions .link-button{width:auto;min-width:0;min-height:26px;padding:3px 8px;flex:0 0 auto;font-size:10px;justify-content:center}

/* Compact project library: numbered cards and short action buttons. */
#tab-merchant-quote-projects #quoteItemList{gap:6px}
#tab-merchant-quote-projects .quote-position-section{gap:5px}
#tab-merchant-quote-projects .quote-position-list{gap:5px}
#tab-merchant-quote-projects #quoteItemList .quote-card{grid-template-columns:72px minmax(0,1fr);padding:6px;gap:7px;border-radius:9px}
#tab-merchant-quote-projects #quoteItemList .quote-card>.quote-thumb,
#tab-merchant-quote-projects #quoteItemList .quote-card>.quote-thumb-wrap{width:72px;height:54px}
#tab-merchant-quote-projects #quoteItemList .quote-card .item-head{gap:4px}
#tab-merchant-quote-projects #quoteItemList .quote-card .item-title{display:flex;align-items:center;gap:6px;font-size:12px;line-height:1.25}
#tab-merchant-quote-projects .quote-project-sequence{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 5px;border-radius:999px;background:#1d1d1f;color:#fff;font-size:11px;font-weight:800;line-height:1;flex:0 0 auto}
#tab-merchant-quote-projects #quoteItemList .quote-card small{font-size:10px;line-height:1.25}
#tab-merchant-quote-projects #quoteItemList .quote-card .quote-description-text{display:-webkit-box;margin:2px 0;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;font-size:10px;line-height:1.45}
#tab-merchant-quote-projects #quoteItemList .quote-card .quote-media-strip{gap:4px}
#tab-merchant-quote-projects #quoteItemList .quote-card .quote-media-strip button,
#tab-merchant-quote-projects #quoteItemList .quote-card .quote-media-strip img,
#tab-merchant-quote-projects #quoteItemList .quote-card .quote-media-strip video{width:42px;height:32px}
#tab-merchant-quote-projects #quoteItemList .quote-card .actions{display:flex;grid-template-columns:none;flex-wrap:wrap;gap:4px;justify-content:flex-start}
#tab-merchant-quote-projects #quoteItemList .quote-card .actions .ghost{width:auto;min-width:0;min-height:26px;padding:3px 9px;flex:0 0 auto;font-size:10px;justify-content:center}
