:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --panel-3: #eef3f8;
  --ink: #172033;
  --muted: #667085;
  --muted-2: #8a95a6;
  --line: #dce3ec;
  --line-strong: #cbd5e1;
  --blue: #2563eb;
  --blue-2: #1d4ed8;
  --teal: #0f9f8f;
  --red: #d64545;
  --amber: #c8841b;
  --green: #257a4f;
  --sidebar: #111827;
  --sidebar-2: #172033;
  --shadow: 0 14px 34px rgba(25, 34, 56, 0.075);
  --shadow-soft: 0 8px 22px rgba(25, 34, 56, 0.055);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.18);
  --border: var(--line);
  --text: var(--ink);
  --accent: var(--blue);
}

.plan-job-notice {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.plan-job-notice-card {
  width: min(480px, 100%);
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.3);
}

.plan-job-notice-card h2 {
  margin: 8px 0 10px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.plan-job-notice-card > p:not(.eyebrow) {
  margin: 0;
  color: #64748b;
  line-height: 1.75;
}

.plan-job-notice-card .button-row {
  margin-top: 24px;
  justify-content: flex-end;
}

.plan-job-notice-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 25px;
  font-weight: 900;
}

@media (max-width: 760px) {
  .plan-job-notice {
    align-items: end;
    padding: 12px;
  }

  .plan-job-notice-card {
    padding: 24px 20px 20px;
    border-radius: 20px;
  }

  .plan-job-notice-card h2 {
    font-size: 24px;
  }

  .plan-job-notice-card .button-row {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* 情绪文案 v1 */
.emotion-workspace { min-width: 0; }
.emotion-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 28px 18px;
}
.emotion-summary-grid article {
  padding: 18px 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  background: var(--panel, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .04);
}
.emotion-summary-grid article span { display: block; color: var(--muted, #64748b); font-size: 13px; }
.emotion-summary-grid article strong { display: block; margin-top: 7px; font-size: 27px; color: var(--ink, #0f172a); }
.emotion-filter-band { margin-bottom: 18px; }
.emotion-filter-band .keyword-search-panel { grid-template-columns: minmax(220px, 1.6fr) repeat(2, minmax(150px, .7fr)) auto; }
.emotion-filter-band select { width: 100%; }
.emotion-favorite-filter {
  display: inline-flex;
  align-items: center;
  align-self: end;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  color: #475569;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}
.emotion-favorite-filter > span { color: #8b5cf6; font-size: 18px; line-height: 1; }
.emotion-favorite-filter > strong { font-size: 13px; }
.emotion-favorite-filter > small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 11px;
}
.emotion-favorite-filter:hover,
.emotion-favorite-filter.is-active { border-color: #a78bfa; color: #6d28d9; background: #faf7ff; }
.emotion-favorite-filter.is-active > small { color: #fff; background: #7c3aed; }
.emotion-type-filter { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line, #dce3ec); }
.emotion-type-filter > strong { color: var(--ink, #172033); font-size: 14px; white-space: nowrap; }
.emotion-type-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.emotion-type-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 11px; background: #fff; color: #475569; font-size: 14px; cursor: pointer; transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease; }
.emotion-type-chip input { width: 18px; height: 18px; margin: 0; accent-color: #3975df; cursor: pointer; }
.emotion-type-chip:has(input:checked) { border-color: #93b4ff; background: #f3f7ff; color: #244b91; box-shadow: 0 3px 10px rgba(37, 99, 235, .05); }
.emotion-type-chip:has(input:focus-visible) { box-shadow: var(--focus); }
.emotion-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 18px;
  padding: 0 28px 36px;
  align-items: start;
}
.emotion-list-panel, .emotion-plan-panel { min-width: 0; }
.emotion-plan-panel { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow: auto; }
.emotion-copy-list { display: grid; gap: 14px; }
.emotion-copy-card {
  padding: 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.emotion-copy-card:hover, .emotion-copy-card.is-selected { border-color: #7c3aed; box-shadow: 0 14px 32px rgba(91, 33, 182, .1); transform: translateY(-1px); }
.emotion-copy-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: #64748b; font-size: 12px; }
.emotion-copy-card blockquote, .emotion-preview-card blockquote {
  margin: 16px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid #8b5cf6;
  color: #111827;
  font-size: 18px;
  line-height: 1.75;
  font-weight: 650;
}
.emotion-analysis-block { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.emotion-analysis-block > div { padding: 13px 14px; border-radius: 12px; background: #f8fafc; }
.emotion-analysis-block strong { font-size: 13px; color: #5b21b6; }
.emotion-analysis-block p { margin: 7px 0 0; color: #475569; line-height: 1.65; }
.emotion-lyric-lines { display: grid; gap: 5px; margin-top: 8px; }
.emotion-analysis-block .emotion-lyric-lines p,
.emotion-plan-insight .emotion-lyric-lines p { margin: 0; color: #312e81; font-size: 15px; line-height: 1.65; font-weight: 650; }
.emotion-card-footer { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-top: 16px; }
.emotion-card-footer > div:first-child { display: flex; flex-wrap: wrap; gap: 7px; }
.emotion-variant-badge, .soft-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #ede9fe; color: #6d28d9; font-size: 12px; }
.emotion-preview-card, .emotion-generated-plan { padding: 4px 2px 14px; }
.emotion-preview-card h3, .emotion-generated-plan h3 { margin: 14px 0 8px; font-size: 24px; }
.emotion-preview-card h4, .emotion-generated-plan h4 { margin: 18px 0 8px; }
.emotion-preview-card > p, .emotion-generated-plan p { color: #475569; line-height: 1.7; }
.emotion-preview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.emotion-preview-grid div { padding: 12px; border-radius: 12px; background: #f8fafc; }
.emotion-preview-grid dt { color: #64748b; font-size: 12px; }
.emotion-preview-grid dd { margin: 5px 0 0; color: #111827; font-weight: 650; line-height: 1.5; }
.emotion-generated-plan section { padding-top: 14px; border-top: 1px solid #e5e7eb; }
.emotion-generated-plan pre { max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; padding: 14px; border-radius: 12px; background: #0f172a; color: #e2e8f0; line-height: 1.65; }
.emotion-plan-summary { font-size: 15px; }
.emotion-admin-columns { padding: 0 28px 18px; }
.emotion-source-list, .emotion-admin-item-list { display: grid; gap: 10px; }
.emotion-source-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .7fr) auto; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: #f8fafc; }
.emotion-source-row > div { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; min-width: 0; }
.emotion-source-row a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #6d28d9; }
.emotion-source-row small { color: #b91c1c; flex-basis: 100%; }
.emotion-admin-item-list article { padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 12px; }
.emotion-admin-item-list article > div { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 12px; color: #64748b; }
.emotion-admin-item-list p { margin: 10px 0 6px; color: #1f2937; line-height: 1.6; }
.emotion-admin-item-list small { color: #94a3b8; }
.status-pill.is-muted { background: #f1f5f9; color: #64748b; }

@media (max-width: 1180px) {
  .emotion-content-grid { grid-template-columns: 1fr; }
  .emotion-plan-panel { position: static; max-height: none; }
  .emotion-filter-band .keyword-search-panel { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .emotion-summary-grid { grid-template-columns: 1fr 1fr; padding-inline: 16px; }
  .emotion-content-grid, .emotion-admin-columns { padding-inline: 16px; }
  .emotion-filter-band .keyword-search-panel, .emotion-analysis-block { grid-template-columns: 1fr; }
  .emotion-card-footer { align-items: stretch; flex-direction: column; }
  .emotion-source-row { grid-template-columns: 1fr; }
  .emotion-type-filter { grid-template-columns: 1fr; }
}

/* 情绪文案 v3：列表与企划页分离 */
.emotion-workspace {
  display: block;
  padding: 22px 26px 34px;
  background: #f5f7fb;
}
.emotion-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 116px;
  margin: 0 0 16px;
  padding: 22px 26px;
  border: 1px solid #e1e7f0;
  border-radius: 18px;
  background: linear-gradient(120deg, #fff 0%, #f5f2ff 58%, #eef7ff 100%);
  box-shadow: 0 12px 30px rgba(40, 34, 85, .05);
}
.emotion-page-head .eyebrow { margin: 0 0 7px; color: #7c3aed; letter-spacing: .13em; }
.emotion-page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.04em; }
.emotion-page-head p:last-child { margin: 9px 0 0; color: #64748b; }
.emotion-workspace .emotion-summary-grid {
  padding: 0;
  margin-bottom: 16px;
}
.emotion-workspace .emotion-filter-band {
  margin: 0 0 16px;
}
.emotion-library-panel {
  padding: 22px;
  border: 1px solid #e1e7f0;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .045);
}
.emotion-library-panel > .section-head { margin-bottom: 16px; }
.emotion-copy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.emotion-copy-card {
  position: relative;
  display: flex;
  min-height: 232px;
  padding: 22px;
  flex-direction: column;
  overflow: hidden;
  border-color: #dfe5ee;
  cursor: default;
  box-shadow: 0 7px 20px rgba(15,23,42,.035);
}
.emotion-copy-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #8b5cf6, #2563eb);
}
.emotion-copy-card:hover { transform: none; border-color: #b8c5d8; box-shadow: 0 11px 28px rgba(30,41,59,.075); }
.emotion-copy-card blockquote {
  flex: 1;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: #111827;
  font-size: 19px;
  line-height: 1.75;
  font-weight: 700;
}
.emotion-copy-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #edf1f6;
  border-bottom: 1px solid #edf1f6;
}
.emotion-copy-details > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.emotion-copy-details small {
  color: #64748b;
  font-size: 11px;
}
.emotion-copy-details strong {
  overflow: hidden;
  color: #334155;
  font-size: 13px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.emotion-card-footer {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: 0;
  padding-top: 14px;
  border: 0;
}
.emotion-card-footer .button-row {
  justify-content: flex-end;
  gap: 9px;
}
.emotion-card-footer .button-row > a {
  white-space: nowrap;
}
.emotion-favorite-button { gap: 6px; white-space: nowrap; }
.emotion-favorite-button > span { color: #8b5cf6; font-size: 17px; line-height: 1; }
.emotion-favorite-button.is-favorite {
  border-color: #c4b5fd;
  color: #6d28d9;
  background: #faf7ff;
}
.emotion-plan-source-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 11px;
  background: #f8fafc;
  color: #64748b;
  line-height: 1.65;
}
.emotion-plan-hook-output {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid #ddd6fe;
  border-radius: 13px;
  background: #faf7ff;
}
.emotion-plan-hook-output p {
  margin: 0;
  color: #312e81;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.75;
}
.emotion-core-meaning,
.emotion-plan-insight {
  margin: 0 0 13px;
  padding: 13px 15px;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  background: #faf7ff;
}
.emotion-core-meaning span,
.emotion-plan-insight span { color: #7c3aed; font-size: 12px; font-weight: 750; }
.emotion-core-meaning p,
.emotion-plan-insight p { margin: 6px 0 0; color: #312e81; line-height: 1.7; font-weight: 600; }
.emotion-card-footer .button-row { flex-wrap: nowrap; }

.emotion-plan-page { max-width: 1180px; }
.emotion-plan-source blockquote {
  margin: 0 0 18px;
  padding: 4px 0 4px 18px;
  border-left: 4px solid #8b5cf6;
  color: #111827;
  font-size: 22px;
  line-height: 1.7;
  font-weight: 720;
}
.emotion-plan-meta-strip {
  margin-bottom: 16px;
}
.emotion-plan-meta-strip > div {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.emotion-plan-meta-strip span { color: #64748b; font-size: 12px; }
.emotion-plan-meta-strip strong { color: #172033; font-size: 14px; overflow-wrap: anywhere; }
.emotion-plan-input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.emotion-plan-edit-field {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid #e9d5ff;
  border-radius: 12px;
  background: #faf7ff;
}
.emotion-plan-edit-field.is-hook { border-color: #dbeafe; background: #f7fbff; }
.emotion-plan-edit-field > span { color: #7c3aed; font-size: 13px; font-weight: 800; }
.emotion-plan-edit-field.is-hook > span { color: #2563eb; }
.emotion-plan-edit-field small { min-height: 34px; color: #64748b; font-size: 12px; line-height: 1.45; }
.emotion-plan-edit-field textarea {
  width: 100%;
  min-height: 112px;
  padding: 11px 12px;
  resize: vertical;
  border-color: #ddd6fe;
  background: rgba(255, 255, 255, .9);
  color: #312e81;
  line-height: 1.65;
  font-weight: 620;
}
.emotion-plan-edit-field.is-hook textarea { border-color: #bfdbfe; color: #1e3a8a; }
.emotion-plan-style-card {
  margin-bottom: 16px;
  padding: 16px;
}
.emotion-plan-style-card .plan-style-category-tabs { margin: 8px 0 14px; }
.emotion-plan-style-card .plan-style-impact { margin-bottom: 0; }
.emotion-plan-insight { margin-top: 14px; }
.emotion-plan-insight.is-secondary { border-color: #dbeafe; background: #f7fbff; }
.emotion-plan-insight.is-secondary span { color: #2563eb; }
.emotion-plan-insight.is-secondary p { color: #1e3a8a; }
.emotion-plan-result-hero { padding: 4px 0 22px; border-bottom: 1px solid #e5e7eb; }
.emotion-plan-result-hero h2 { margin: 12px 0 8px; font-size: 30px; }
.emotion-plan-result-hero p,
.plan-output-section > p { color: #475569; line-height: 1.8; }
.plan-output-section { padding: 23px 0; border-bottom: 1px solid #e5e7eb; }
.plan-output-section h3 { margin: 0 0 13px; }
.plan-output-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.plan-output-grid div { padding: 14px; border-radius: 12px; background: #f8fafc; }
.plan-output-grid dt { color: #64748b; font-size: 12px; }
.plan-output-grid dd { margin: 6px 0 0; color: #172033; line-height: 1.6; font-weight: 620; }
.emotion-plan-lyrics,
.emotion-plan-prompt { margin: 0; padding: 18px; border-radius: 13px; white-space: pre-wrap; word-break: break-word; line-height: 1.75; }
.emotion-plan-lyrics { background: #f8fafc; color: #1f2937; }
.emotion-plan-prompt { background: #111827; color: #e2e8f0; }
.plan-risk-list { display: grid; gap: 10px; }
.plan-risk-list article { padding: 13px 15px; border-radius: 12px; background: #fff7ed; }
.plan-risk-list p { margin: 5px 0 0; color: #7c2d12; line-height: 1.6; }
.plan-result-actions { padding-top: 20px; }

@media (max-width: 800px) {
  .emotion-workspace { padding: 14px; }
  .emotion-page-head { align-items: flex-start; flex-direction: column; padding: 19px; }
  .emotion-summary-grid { grid-template-columns: 1fr 1fr; }
  .emotion-library-panel { padding: 15px; }
  .emotion-analysis-block,
  .emotion-plan-input-grid,
  .plan-output-grid { grid-template-columns: 1fr; }
  .emotion-card-footer { align-items: stretch; flex-direction: column; }
  .emotion-card-footer .button-row { flex-wrap: wrap; }
  .emotion-copy-list { grid-template-columns: 1fr; }
  .emotion-copy-card { min-height: 0; }
  .emotion-copy-details { grid-template-columns: minmax(0, 1fr) auto auto; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.07), transparent 36%),
    linear-gradient(180deg, #fbfcfe, var(--bg));
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: #111827;
  color: #fff;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 800;
}

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

.brand span {
  margin-top: 3px;
  color: #b7c0ce;
  font-size: 13px;
}

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

.nav-accordion {
  align-content: start;
  gap: 12px;
}

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

.nav-group summary {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 4px;
  color: #eef3fb;
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid #8fa0b8;
  border-bottom: 2px solid #8fa0b8;
  transform: rotate(45deg);
  transition: transform 0.16s ease;
}

.nav-group[open] summary::after {
  transform: rotate(225deg);
}

.nav-group-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #d7dee9;
  font-size: 11px;
  font-weight: 900;
}

.nav-group-items {
  display: grid;
  gap: 7px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #d7dee9;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.nav-link {
  text-decoration: none;
}

.nav-button.is-active {
  color: #fff;
  background: rgba(36, 107, 254, 0.32);
  border-color: rgba(115, 156, 255, 0.6);
}

.nav-button.is-disabled,
.nav-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.nav-group-items .nav-button {
  min-height: 40px;
  padding: 8px 9px;
}

.section-head h2 {
  margin: 0;
  font-size: 16px;
}

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

input,
select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.workspace {
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  min-width: 0;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

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

.icon-button,
.primary-button,
.secondary-button {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.icon-button {
  width: 42px;
  background: var(--panel);
  color: var(--ink);
  font-size: 20px;
}

.primary-button {
  padding: 0 16px;
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
  font-weight: 700;
}

.link-button,
.plan-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.secondary-button {
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel);
  font-weight: 700;
}

.secondary-button.danger-button {
  color: var(--red);
  border-color: rgba(214, 69, 69, 0.32);
}

.favorite-button.is-favorite,
.secondary-button.is-favorite {
  color: #8a5b00;
  border-color: rgba(200, 132, 27, 0.4);
  background: rgba(200, 132, 27, 0.12);
}

.danger-button {
  color: var(--red);
  border-color: rgba(214, 69, 69, 0.45);
}

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

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin: 9px 0 3px;
  font-size: 28px;
}

.control-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.keyword-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.keyword-search-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.keyword-search-panel span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.keyword-search-panel input {
  min-height: 36px;
}

.trend-filter-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.trend-filter-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trend-filter-head strong {
  margin-right: auto;
  font-size: 14px;
}

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

.trend-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-2);
  font-size: 13px;
}

.trend-checks input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.purchase-filter-grid {
  display: grid;
  gap: 9px;
}

.purchase-filter-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.purchase-filter-row > span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.purchase-segments {
  width: fit-content;
  max-width: 100%;
}

.rank-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 700;
}

.workflow-panel,
.model-panel {
  display: none;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.workflow-panel.is-open,
.model-panel.is-open {
  display: block;
}

.admin-workflow-board {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.workflow-panel.admin-stage {
  margin-bottom: 0;
  min-width: 0;
}

.workflow-panel.admin-stage.is-open {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-stage .ingest-card,
.admin-stage .ingest-preview {
  margin: 0;
}

.admin-stage .button-row {
  gap: 8px;
}

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

.model-grid.compact-model-grid {
  grid-template-columns: 1fr;
  gap: 10px;
}

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

.model-grid {
  margin-bottom: 12px;
}

.tag-picker,
.platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-picker label,
.platform-row label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-2);
  font-size: 13px;
}

.tag-picker input,
.platform-row input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.inline-note {
  align-self: center;
  color: var(--muted);
  font-size: 13px;
}

.ingest-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.ingest-card h3 {
  margin: 0;
  font-size: 15px;
}

.ingest-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

textarea {
  width: 100%;
  min-height: 126px;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  line-height: 1.5;
}

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

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  color: var(--ink);
  font-size: 13px;
}

.inline-check input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.ingest-preview {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.ingest-preview span {
  color: var(--muted);
  font-size: 13px;
}

.ingest-preview pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #d8e4ff;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.memory-panel {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.memory-panel h3 {
  margin: 0;
  font-size: 15px;
}

.memory-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.memory-panel pre {
  max-height: 180px;
  overflow: auto;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.memory-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 240px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.memory-table {
  display: grid;
  gap: 12px;
  overflow-x: auto;
}

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

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

.sheet-table th {
  color: var(--muted);
  background: #f8fafc;
  font-weight: 700;
}

.sheet-table select,
.sheet-table textarea {
  width: 100%;
  min-height: 34px;
  font-size: 12px;
}

.sheet-table textarea {
  resize: vertical;
}

.sheet-table .wide-cell {
  min-width: 180px;
  font-weight: 700;
  color: var(--ink);
}

.compact-check {
  align-self: center;
}

.memory-sheet {
  min-width: 980px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.memory-sheet-row {
  display: grid;
  grid-template-columns: 150px 140px 120px 180px 150px minmax(260px, 1fr) 130px 130px;
  gap: 0;
  border-top: 1px solid var(--line);
}

.memory-sheet-row:first-child {
  border-top: 0;
}

.memory-sheet-row > div {
  min-width: 0;
  padding: 8px;
  border-left: 1px solid var(--line);
}

.memory-sheet-row > div:first-child {
  border-left: 0;
}

.memory-sheet-head {
  color: var(--muted);
  background: var(--panel-2);
  font-size: 12px;
  font-weight: 800;
}

.memory-sheet input,
.memory-sheet select,
.memory-sheet textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

.memory-latest-badge,
.memory-manual-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-top: 6px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.memory-latest-badge {
  border: 1px solid #60a5fa;
  color: #1d4ed8;
  background: #eff6ff;
}

.memory-manual-badge {
  border: 1px solid #f59e0b;
  color: #92400e;
  background: #fffbeb;
}

.memory-sheet textarea {
  resize: vertical;
  line-height: 1.5;
}

.memory-source {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
}

.memory-source strong {
  color: var(--ink);
}

.memory-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.memory-actions .secondary-button {
  min-height: 34px;
  padding: 0 10px;
}

.save-sync-button,
.memory-dirty-badge {
  display: none;
}

.memory-sheet-row.is-dirty .save-sync-button,
.memory-sheet-row.is-dirty .memory-dirty-badge {
  display: inline-flex;
}

.memory-sheet-row.is-saving {
  opacity: 0.72;
}

.memory-sheet-row.is-saving .save-sync-button {
  display: inline-flex;
  pointer-events: none;
}

.memory-dirty-badge {
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 999px;
  color: #8a4d05;
  background: rgba(245, 158, 11, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.memory-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

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

.memory-row-head strong {
  font-size: 17px;
}

.memory-row-head span {
  color: var(--muted);
  font-size: 12px;
}

.memory-row-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.memory-wide {
  grid-column: span 2;
}

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

.memory-check {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.memory-check input {
  width: auto;
  min-height: auto;
  padding: 0;
}

.progress-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.progress-head strong {
  color: var(--ink);
  font-size: 14px;
}

.progress-head span,
.progress-detail {
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: var(--panel-2);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.25s ease;
}

/* Unified admin backend */
.admin-shell {
  align-items: stretch;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
}

.admin-workspace {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 0 0 14px;
  background: var(--bg);
}

.admin-view {
  display: none;
  min-width: 0;
}

.admin-view.is-active {
  display: grid;
  gap: 16px;
}

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

.admin-status-card,
.admin-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-status-card {
  padding: 14px;
}

.admin-status-card span,
.admin-status-card small {
  display: block;
  color: var(--muted);
}

.admin-status-card strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.1;
}

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

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.admin-panel .section-head {
  align-items: flex-start;
}

.admin-panel .section-head h2 {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-panel .section-head span {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.admin-two-column,
.admin-three-column {
  display: grid;
  gap: 14px;
  align-items: start;
}

.admin-two-column {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.admin-three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-module-header h2 {
  margin: 0 0 4px;
}

.admin-module-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}

.status-pill.is-active {
  color: #0b6b3a;
  border-color: rgba(18, 132, 78, 0.28);
  background: rgba(18, 132, 78, 0.1);
}

.status-pill.is-danger {
  color: var(--red);
  border-color: rgba(214, 69, 69, 0.28);
  background: rgba(214, 69, 69, 0.1);
}

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

.llm-task-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.llm-task-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.llm-task-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(86px, 0.7fr) minmax(90px, 0.7fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr);
  gap: 10px;
  align-items: center;
  min-width: 720px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.llm-task-row:last-child {
  border-bottom: 0;
}

.llm-task-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  background: var(--panel-2);
}

.llm-task-row strong {
  color: var(--ink);
  font-size: 13px;
}

.llm-task-row select,
.llm-task-row input[type="number"],
.llm-task-row input[type="text"],
.llm-task-row textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 6px 8px;
}

.purchase-company-rule-row {
  grid-template-columns: minmax(130px, 0.7fr) minmax(150px, 0.8fr) minmax(260px, 2fr) 72px;
  min-width: 0;
  align-items: stretch;
}

.purchase-company-rule-row textarea {
  min-height: 74px;
  resize: vertical;
}

.purchase-company-rule-row button {
  align-self: center;
  min-height: 34px;
}

.company-summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.company-summary-grid .admin-status-card { min-height: 96px; }

.company-knowledge-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(150px, 0.8fr));
  gap: 10px;
  margin-bottom: 14px;
}

.company-knowledge-toolbar label,
.company-entity-form > label { display: grid; gap: 6px; }

.company-knowledge-toolbar label > span,
.company-entity-form label > span,
.company-entity-form legend { color: var(--muted); font-size: 12px; font-weight: 700; }

.company-knowledge-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(560px, 1.45fr);
  gap: 14px;
  align-items: start;
}

.company-entity-list-panel,
.company-entity-editor-panel { min-width: 0; }
.company-entity-list { display: grid; gap: 5px; max-height: 720px; overflow: auto; }

.company-entity-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--ink);
  background: #f7f9fc;
  text-align: left;
}

.company-entity-item:hover,
.company-entity-item.is-selected { border-color: #b9ccef; background: #eef4ff; }
.company-review-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.company-review-dot.is-approved { background: var(--green); }
.company-review-dot.is-pending_review { background: var(--amber); }
.company-review-dot.is-needs_info { background: var(--blue); }
.company-review-dot.is-rejected { background: var(--red); }
.company-entity-copy { display: grid; gap: 3px; min-width: 0; }
.company-entity-copy strong,
.company-entity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-entity-copy small,
.company-observation-count { color: var(--muted); font-size: 12px; }
.company-entity-form { display: grid; gap: 12px; }

.company-entity-form fieldset {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.company-role-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; }
.company-ai-suggestion { padding: 12px; border: 1px solid #d8e3f4; border-radius: 7px; background: #f5f8fe; }
.company-ai-suggestion p { margin: 5px 0; }

.company-relation-editor,
.company-merge-editor { display: grid; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.company-relation-editor h3,
.company-merge-editor h3 { margin: 0; font-size: 15px; }
.company-relation-list { display: grid; gap: 6px; }

.company-relation-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 32px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

@media (max-width: 1180px) {
  .company-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .company-knowledge-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-knowledge-layout { grid-template-columns: 1fr; }
  .purchase-company-selects { grid-template-columns: 1fr; }
}

.compact-check,
.inline-check.compact-check {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  cursor: pointer;
}

.compact-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.probe-card {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

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

.probe-card small {
  color: var(--muted);
  line-height: 1.5;
}

.probe-card.is-success {
  border-color: rgba(20, 184, 166, 0.55);
  background: rgba(20, 184, 166, 0.08);
}

.probe-card.is-waiting {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.08);
}

.probe-card.is-error {
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.08);
}

.admin-status-list {
  display: grid;
  gap: 8px;
}

.admin-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-status-row span {
  min-width: 0;
  color: var(--muted);
  text-align: right;
  overflow-wrap: anywhere;
}

.admin-job-list {
  display: grid;
  gap: 8px;
}

.admin-job-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.admin-job-item.is-running {
  border-color: rgba(36, 107, 254, 0.5);
  background: rgba(36, 107, 254, 0.07);
}

.admin-job-item span,
.admin-job-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.admin-task-progress {
  margin: 0;
}

.admin-debug {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-debug summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
}

.admin-debug pre {
  max-height: 420px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  border-top: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

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

.tag-stat-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.tag-stat-item strong,
.tag-stat-item span {
  display: block;
}

.tag-stat-item span {
  color: var(--muted);
}

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

.sheet-table th,
.sheet-table td {
  padding: 9px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.sheet-table th {
  color: var(--muted);
  background: var(--panel-2);
}

.sheet-table .wide-cell {
  min-width: 220px;
}

.compact-memory-table {
  overflow: auto;
}

@media (max-width: 1180px) {
  .admin-status-grid,
  .admin-two-column,
  .admin-three-column {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1180px) {
  .purchase-company-selects { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .admin-status-grid,
  .admin-two-column,
  .admin-three-column,
  .admin-form-grid,
  .probe-grid,
  .tag-stat-grid {
    grid-template-columns: 1fr;
  }

  .admin-module-header,
  .admin-job-item {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-status-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-status-row span {
    text-align: left;
  }
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

#searchCategorySegments {
  min-width: 0;
}

.segment {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segment.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 12px rgba(20, 26, 40, 0.08);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
  gap: 16px;
}

.radar-list,
.proposal-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

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

.purchase-sort-control {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.purchase-sort-control[hidden] {
  display: none;
}

.purchase-sort-control select {
  width: auto;
  min-width: 218px;
  min-height: 34px;
  padding: 6px 30px 6px 10px;
  font-size: 13px;
}

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

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
}

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

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.original-jump-button {
  align-self: center;
  min-width: 70px;
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.opportunity.is-selected {
  border-color: rgba(36, 107, 254, 0.55);
  box-shadow: inset 3px 0 0 var(--blue);
}

.score-ring {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: var(--ink);
  font-weight: 800;
  background:
    conic-gradient(var(--score-color) calc(var(--score) * 1%), #edf1f6 0),
    #fff;
}

.score-ring span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
}

.review-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(200, 132, 27, 0.45);
  border-radius: 50%;
  color: var(--amber);
  background: rgba(200, 132, 27, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.purchase-rank-mark {
  width: 64px;
  height: 44px;
  border-color: #cbd8ea;
  border-radius: 7px;
  color: #173a67;
  background: #eef4fb;
  font-variant-numeric: tabular-nums;
}

.purchase-artist {
  flex: 0 1 auto;
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-note {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(200, 132, 27, 0.35);
  border-radius: 8px;
  color: #7a4f0f;
  background: rgba(200, 132, 27, 0.08);
  font-weight: 700;
}

.opportunity-main {
  min-width: 0;
}

.opportunity-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.opportunity-title strong {
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.badge.tme {
  background: var(--blue);
}

.badge.douyin {
  background: var(--red);
}

.badge.kuaishou {
  background: var(--amber);
}

.badge.bilibili {
  background: var(--teal);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.proposal-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.proposal-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proposal-hero {
  padding: 16px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #16213a, #246bfe 58%, #0f9f8f);
}

.proposal-hero span {
  display: block;
  margin-bottom: 8px;
  opacity: 0.82;
  font-size: 13px;
}

.proposal-hero strong {
  display: block;
  font-size: 22px;
}

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

.primary-button[disabled],
.secondary-button[disabled] {
  cursor: not-allowed;
  opacity: 0.58;
}

.plan-page {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0;
  min-width: 0;
}

.plan-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 0.58fr);
  gap: 16px;
  align-items: start;
}

.plan-page--detail {
  width: min(1180px, calc(100% - 40px));
}

.plan-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.plan-source-card,
.plan-result-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.plan-source-card {
  position: sticky;
  top: 16px;
}

.plan-meta-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.plan-meta-row {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.plan-meta-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

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

.plan-meta-row strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(36, 107, 254, 0.09);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.plan-result-content {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.plan-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.plan-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.plan-section--highlight {
  padding: 14px;
  border: 1px solid rgba(36, 107, 254, 0.16);
  border-radius: 8px;
  background: rgba(36, 107, 254, 0.05);
}

.plan-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.plan-section ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.75;
}

.plan-text-block {
  color: var(--ink);
  line-height: 1.75;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-pre {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.65;
}

.plan-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-chip-list span {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.plan-style-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.plan-style-option {
  min-width: 0;
  margin-top: 0;
}

.style-option {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.style-option p {
  margin: 0;
  color: var(--muted);
}

.cover-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.plan-brief-panel {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid rgba(36, 107, 254, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(36, 107, 254, 0.06), #fff);
  box-shadow: var(--shadow);
}

.brief-field textarea {
  min-height: 92px;
  resize: vertical;
}

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

.style-selector {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  margin-bottom: 14px;
}

.style-selector-head,
.style-selector-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.style-selector-head strong {
  display: block;
  font-size: 15px;
}

.style-selector-head span,
.style-selector-status {
  color: var(--muted);
  font-size: 12px;
}

.style-selector-controls select,
.style-selector-controls input {
  min-width: 0;
  width: 100%;
}

.style-selector-controls label {
  display: grid;
  gap: 4px;
  flex: 1 1 180px;
}

.style-selector-controls label span {
  color: var(--muted);
  font-size: 12px;
}

.style-selector--compact .style-selector-controls {
  align-items: end;
  justify-content: flex-start;
}

.style-selected-list,
.style-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.style-selected-list {
  min-height: 30px;
  align-items: center;
  margin-bottom: 10px;
}

.plan-generate-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.plan-generate-row .primary-button {
  min-width: 180px;
}

.plan-data-panel {
  margin-bottom: 16px;
}

.plan-data-panel .section-head {
  margin-bottom: 12px;
}

.plan-data-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  min-width: 0;
}

.plan-data-strip .proposal-item {
  min-width: 0;
  height: 100%;
}

.plan-data-strip .proposal-item strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.plan-result-card {
  min-width: 0;
}

.plan-style-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(36, 107, 254, 0.2);
  border-radius: 8px;
  background: #fff;
}

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

.plan-style-panel-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.plan-style-panel-head span,
.plan-style-status {
  color: var(--muted);
  font-size: 12px;
}

.plan-style-category-row {
  display: grid;
  gap: 6px;
  max-width: 320px;
}

.plan-style-category-row span {
  color: var(--muted);
  font-size: 12px;
}

.plan-style-category-row select {
  width: 100%;
}

.plan-style-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.plan-style-category-tab {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 12px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.plan-style-category-tab small { font-size: 11px; }

.plan-style-category-tab.is-active {
  border-color: var(--accent);
  background: #eef4ff;
  color: var(--accent);
}

.plan-style-impact {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bfd3ff;
  border-radius: 10px;
  background: #f5f8ff;
}

.plan-style-impact span { color: var(--muted); font-size: 13px; line-height: 1.6; }

.plan-style-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  min-width: 0;
}

.plan-style-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-width: 0;
  min-height: 138px;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.plan-style-card strong,
.plan-style-card small,
.plan-style-card em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.plan-style-card strong {
  font-size: 15px;
}

.plan-style-card small {
  color: var(--ink);
  line-height: 1.45;
}

.plan-style-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.plan-style-card.is-selected {
  border-color: #123fb8;
  background: #eef4ff;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.22), var(--shadow);
  transform: translateY(-1px);
}

.plan-style-card.is-selected::after {
  content: "已选";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #123fb8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.style-selected-chip,
.style-choice {
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}

.style-selected-chip {
  padding: 6px 10px;
  font-size: 12px;
}

.style-choice {
  width: min(260px, 100%);
  text-align: left;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.style-choice strong,
.style-choice span,
.style-choice small,
.style-choice em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.style-choice span {
  color: var(--accent);
  font-size: 12px;
}

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

.style-choice.is-selected {
  border-color: var(--accent);
  background: #eef4ff;
}

.style-library-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.style-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.style-library-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.style-library-card strong,
.style-library-card p {
  overflow-wrap: anywhere;
}

.style-library-card span {
  color: var(--accent);
  font-size: 12px;
}

.style-library-card.is-disabled { opacity: .68; background: #f6f7f9; }

.style-library-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.style-library-card-head .secondary-button { min-height: 30px; padding: 5px 9px; }

.style-library-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.style-library-editor label { display: grid; gap: 5px; }
.style-library-editor textarea { min-height: 76px; resize: vertical; }
.style-library-editor label:nth-of-type(5) textarea,
.style-library-editor label:nth-of-type(6) textarea { min-height: 150px; }
.style-library-editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.style-library-editor-row .checkbox-row { display: flex; align-items: center; padding-bottom: 10px; }

@media (max-width: 680px) {
  .plan-style-category-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .plan-style-category-tab { flex: 0 0 auto; }
  .style-library-editor-row { grid-template-columns: 1fr; }
}

.lyrics-box {
  margin-top: 14px;
}

.lyrics-box textarea {
  min-height: 220px;
}

.tools-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  min-width: 0;
}

.tool-hub-card {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
}

.tool-hub-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tool-hub-card:hover {
  border-color: rgba(36, 107, 254, 0.55);
  background: rgba(36, 107, 254, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.08);
}

.tool-entry-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(36, 107, 254, 0.1);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.tool-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.custom-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.custom-plan-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.custom-plan-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
}

.custom-plan-card-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.custom-plan-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.custom-plan-form textarea {
  min-height: 112px;
  resize: vertical;
}

.custom-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.custom-plan-intro,
.custom-plan-form-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.custom-plan-intro {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.custom-plan-intro strong {
  font-size: 16px;
}

.custom-plan-intro p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.custom-plan-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.custom-plan-type {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 5px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.custom-plan-type .tool-entry-icon {
  grid-row: span 2;
}

.custom-plan-type strong {
  align-self: end;
}

.custom-plan-type small {
  color: var(--muted);
  line-height: 1.45;
}

.custom-plan-type:hover,
.custom-plan-type.is-active {
  border-color: rgba(36, 107, 254, 0.62);
  background: rgba(36, 107, 254, 0.06);
  box-shadow: 0 0 0 3px rgba(36, 107, 254, 0.09);
}

.custom-plan-form-card {
  padding: 18px;
}

.custom-plan-form-card .section-head {
  margin-bottom: 16px;
}

.custom-plan-form label em {
  margin-left: 4px;
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.tool-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-page-head h2 {
  margin: 0;
  font-size: 20px;
}

.tool-page-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.tool-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 159, 143, 0.1);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.tool-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tool-card-head h3 {
  margin: 0;
  font-size: 16px;
}

.tool-card-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.tool-textarea {
  min-height: 430px;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", "Microsoft YaHei", monospace;
  line-height: 1.7;
}

.tool-textarea--compact {
  min-height: 150px;
}

.suno-input-grid .tool-textarea {
  min-height: 132px;
}

.tool-card--result .tool-textarea {
  background: #fbfcfe;
}

.tool-idea-box {
  display: grid;
  gap: 7px;
}

.tool-idea-box textarea {
  min-height: 96px;
  font-family: inherit;
  line-height: 1.6;
}

.tool-choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-choice-group legend {
  grid-column: 1 / -1;
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tool-choice-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
}

.tool-choice-group label:has(input:checked) {
  border-color: rgba(36, 107, 254, 0.55);
  background: rgba(36, 107, 254, 0.08);
  color: var(--blue);
  font-weight: 800;
}

.tool-choice-group input {
  accent-color: var(--blue);
}

@media (max-width: 720px) {
  .tool-choice-group {
    grid-template-columns: 1fr;
  }
}

.tool-logic-box {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.tool-logic-box h3 {
  margin: 0;
  font-size: 15px;
}

.tool-logic-box div {
  color: var(--ink);
  line-height: 1.75;
  white-space: pre-wrap;
}

.tool-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 40px;
}

.tool-action-bar .tool-status {
  min-width: min(100%, 220px);
}

.tool-warnings ul {
  margin: 0;
  padding-left: 18px;
  color: var(--amber);
  line-height: 1.7;
}

.suno-prompt-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.suno-prompt-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

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

.suno-prompt-card-head strong {
  font-size: 14px;
}

.suno-prompt-card p {
  margin: 0;
  color: var(--ink);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.tool-analysis-details {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.tool-analysis-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.tool-analysis {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.tool-analysis-grid {
  display: grid;
  gap: 10px;
}

.tool-analysis-card {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tool-analysis-card strong {
  color: var(--blue);
}

.tool-analysis-card span {
  color: var(--muted);
  font-size: 12px;
}

.tool-analysis-card p {
  color: var(--ink);
  font-size: 13px;
}

.cover-result {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
}

.cover-result,
.cover-result *,
.plan-readable-content,
.plan-readable-content *,
.proposal-grid,
.proposal-grid *,
.history-item,
.history-item * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cover-section {
  display: grid;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.cover-section:last-child {
  border-bottom: 0;
}

.cover-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.plan-summary-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.cover-section > p,
.plan-summary-text {
  margin: 0;
  color: var(--ink);
  line-height: 1.9;
  font-size: 14px;
}

.cover-section ul {
  margin: 0;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.7;
}

.plan-numbered-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.plan-numbered-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.plan-numbered-list strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.plan-numbered-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.muted-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.lyric-section strong {
  color: var(--blue);
  font-size: 13px;
}

.lyric-section pre,
.direction-card pre {
  overflow-x: auto;
  max-width: 100%;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  background: #0f172a;
  color: #d8e4ff;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.direction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

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

.direction-card span {
  color: var(--muted);
  font-size: 12px;
}

.direction-card h4 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.direction-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.plan-helper-details {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
}

.plan-helper-details summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
}

.plan-helper-details p {
  margin: 10px 0 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.direction-card dl {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 5px 8px;
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

.direction-card dt {
  color: var(--muted);
}

.direction-card dd {
  margin: 0;
}

.proposal-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.proposal-item span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.proposal-item strong {
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--green);
  background: rgba(37, 122, 79, 0.1);
  font-size: 12px;
  font-weight: 700;
}

.trend-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: #8a4d05;
  background: rgba(245, 158, 11, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.proposal-empty {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: var(--muted);
  text-align: center;
}

.empty-visual {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  align-items: end;
  gap: 8px;
  height: 92px;
  margin-bottom: 14px;
}

.empty-visual span {
  display: block;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, rgba(36, 107, 254, 0.85), rgba(15, 159, 143, 0.85));
}

.empty-visual span:nth-child(1) {
  height: 48px;
}

.empty-visual span:nth-child(2) {
  height: 76px;
}

.empty-visual span:nth-child(3) {
  height: 60px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: #111827;
  box-shadow: var(--shadow);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(36, 107, 254, 0.18), transparent 48%),
    rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(8px);
}

.auth-gate-page {
  min-height: 100vh;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-brand {
  color: var(--ink);
}

.auth-brand span {
  color: var(--muted);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.auth-form textarea {
  width: 100%;
  min-height: 76px;
  padding: 9px 10px;
  resize: vertical;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.account-admin-workspace {
  min-width: 0;
}

.account-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.account-admin-summary article,
.account-admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.account-admin-summary article {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
}

.account-admin-summary span,
.account-admin-summary small {
  color: var(--muted);
}

.account-admin-summary strong {
  font-size: 28px;
}

.account-admin-panel {
  padding: 16px;
  margin-bottom: 16px;
}

.account-admin-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.account-admin-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.account-role-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 7px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}

.account-role-badge.is-super_admin {
  color: #7c2d12;
  border-color: rgba(194, 65, 12, 0.24);
  background: #fff7ed;
}

.registration-request-list,
.account-user-list {
  display: grid;
  gap: 10px;
}

.registration-request-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.registration-request-main {
  min-width: 0;
}

.registration-request-title,
.registration-request-meta,
.registration-request-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.registration-request-title strong {
  font-size: 16px;
}

.registration-request-title span,
.registration-request-meta,
.registration-request-main p {
  color: var(--muted);
  font-size: 13px;
}

.registration-request-meta {
  margin-top: 7px;
}

.registration-request-main p {
  margin: 9px 0 0;
  line-height: 1.6;
}

.account-user-search {
  width: min(280px, 100%);
}

.account-user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 130px;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.account-user-row:last-child {
  border-bottom: 0;
}

.account-user-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.account-user-identity span,
.account-user-identity small,
.account-role-lock {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.account-admin-empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 120px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.account-admin-error {
  padding: 12px 14px;
  border: 1px solid rgba(214, 69, 69, 0.32);
  border-radius: 8px;
  color: var(--red);
  background: rgba(214, 69, 69, 0.06);
}

/* Shared filter language for recognition, TOP2000 analysis and daily topics. */
body #purchaseFilterPanel {
  gap: 0;
  padding: 10px 12px;
  border-color: #dbe3ee;
  background: #fbfcfe;
}

body #purchaseFilterPanel > .trend-filter-head {
  display: none;
}

body #purchaseFilterPanel .purchase-filter-grid {
  gap: 8px;
}

body #purchaseFilterPanel .purchase-filter-row {
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

body #purchaseFilterPanel .purchase-filter-row > span {
  min-height: 34px;
  color: #334155;
  font-weight: 800;
}

body #purchaseFilterPanel .purchase-segments {
  width: 100%;
  gap: 5px;
  padding: 5px;
  border-color: #dbe3ee;
  background: #f4f7fb;
}

.purchase-company-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 8px;
}

body #purchaseFilterPanel .purchase-rights-filter-row {
  align-items: start;
}

.purchase-rights-filters {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.purchase-rights-filter {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #f8fafc;
}

.purchase-rights-filter-head {
  display: grid;
  gap: 3px;
  padding: 5px 2px;
}

.purchase-rights-filter-head strong {
  color: #1f3f67;
  font-size: 14px;
}

.purchase-rights-filter-head small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

body[data-mode="purchase"] .proposal-grid {
  gap: 7px;
}

body[data-mode="purchase"] .proposal-item {
  padding: 10px 14px;
}

.purchase-company-selects label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.purchase-company-selects label > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.purchase-company-selects select { width: 100%; min-height: 34px; }

@media (max-width: 1180px) {
  .purchase-company-selects { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .purchase-rights-filter { grid-template-columns: 1fr; }
  .purchase-rights-filter-head { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; }
}

body #purchaseFilterPanel .segment {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

body #originalDatePanel,
body #originalCategoryPanel,
body #originalPlatformPanel {
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-color: #dbe3ee;
  background: #fbfcfe;
}

body #originalDatePanel .trend-filter-head,
body #originalCategoryPanel .trend-filter-head,
body #originalPlatformPanel .trend-filter-head {
  display: contents;
}

body #originalDatePanel .trend-filter-head strong,
body #originalCategoryPanel .trend-filter-head strong,
body #originalPlatformPanel .trend-filter-head strong {
  grid-column: 1;
  margin: 0;
  color: #334155;
  font-weight: 800;
  white-space: nowrap;
}

body #originalDatePanel .trend-filter-head > span,
body #originalCategoryPanel .trend-filter-head > span,
body #originalPlatformPanel .trend-filter-head > span {
  display: none;
}

body #originalDatePanel > .keyword-search-panel {
  grid-column: 2;
  display: block;
}

body #originalDatePanel > .keyword-search-panel label {
  display: block;
}

body #originalDatePanel > .keyword-search-panel label > span {
  display: none;
}

body #originalDateSelect {
  min-height: 36px;
}

body #originalCategorySegments {
  grid-column: 2;
  width: 100%;
  gap: 5px;
  padding: 5px;
  border-color: #dbe3ee;
  background: #f4f7fb;
}

body #originalCategorySegments .segment {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

body #originalPlatformSegments {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body #originalPlatformSegments .category-segment {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b9cff1;
  border-radius: 7px;
  color: #24436c;
  background: #f1f6fd;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 680px) {
  body #purchaseFilterPanel .purchase-filter-row,
  body #originalDatePanel,
  body #originalCategoryPanel,
  body #originalPlatformPanel {
    grid-template-columns: 1fr;
  }

  body #originalDatePanel > .keyword-search-panel,
  body #originalCategorySegments,
  body #originalPlatformSegments {
    grid-column: 1;
  }
}

/* Search dashboard controls: one clear vertical flow, compact filters, no dead columns. */
body .control-band {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  padding: 12px;
}

body #searchCategorySegments {
  width: 100%;
  gap: 6px;
  padding: 6px;
  border-color: #dbe3ee;
  background: #f4f7fb;
}

body #searchCategorySegments .segment {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
}

body #searchCategorySegments .segment.is-active {
  color: #172033;
  border-color: #d6e1f0;
  background: #fff;
  box-shadow: 0 3px 10px rgba(23, 32, 51, 0.07);
}

body #keywordSearchPanel {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 2px 0 0;
}

body #keywordSearchPanel label {
  grid-template-columns: 118px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

body #keywordSearchPanel label > span {
  color: #334155;
  font-weight: 800;
}

body #keywordSearchPanel input {
  min-height: 38px;
}

body #keywordSearchPanel .secondary-button {
  min-width: 82px;
  min-height: 38px;
}

body #trendFilterPanel,
body #recognitionFilterPanel {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-color: #dbe3ee;
  background: #fbfcfe;
}

body #trendFilterPanel .trend-filter-head,
body #recognitionFilterPanel .trend-filter-head {
  display: contents;
}

body #trendFilterPanel .trend-filter-head strong,
body #recognitionFilterPanel .trend-filter-head strong {
  margin: 0;
  white-space: nowrap;
}

body #trendFilterPanel .trend-checks,
body #recognitionFilterPanel .trend-checks {
  grid-column: 2;
  grid-row: 1;
  gap: 6px;
}

body #trendFilterPanel .trend-filter-head .secondary-button,
body #recognitionFilterPanel .trend-filter-head .secondary-button {
  min-height: 34px;
  padding: 0 11px;
}

body #trendFilterPanel .trend-checks label,
body #recognitionFilterPanel .trend-checks label {
  min-height: 32px;
  padding: 5px 9px;
  border-color: #dbe3ee;
  background: #fff;
  font-size: 12px;
}

body #trendFilterPanel .trend-checks label:has(input:checked),
body #recognitionFilterPanel .trend-checks label:has(input:checked) {
  color: #24436c;
  border-color: #b9cff1;
  background: #f1f6fd;
}

body #trendFilterPanel .trend-checks input,
body #recognitionFilterPanel .trend-checks input {
  accent-color: #2563eb;
}

body .topbar {
  min-height: 82px;
}

body .metric {
  min-height: 104px;
  padding: 14px;
}

body .metric-icon {
  top: 13px;
  right: 13px;
  width: 30px;
  height: 30px;
}

body .metric strong {
  margin-top: 9px;
  font-size: 26px;
}

@media (max-width: 980px) {
  body #trendFilterPanel,
  body #recognitionFilterPanel {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  body #trendFilterPanel .trend-checks,
  body #recognitionFilterPanel .trend-checks {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 620px) {
  body #keywordSearchPanel {
    grid-template-columns: 1fr;
  }

  body #keywordSearchPanel label {
    grid-template-columns: 1fr;
  }

  body #keywordSearchPanel .secondary-button {
    width: 100%;
  }

  body #trendFilterPanel,
  body #recognitionFilterPanel {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

/* 2026-07 visual system: restrained layout, one icon language, no decorative crosses. */
.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  gap: 16px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #12213a, #0c1220);
}

.brand {
  gap: 11px;
  padding: 4px 2px 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #0f9f8f);
  box-shadow: 0 8px 20px rgba(5, 12, 24, 0.24);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
}

.brand-mark::after,
.topbar::after,
.metric::before,
.metric::after,
.proposal-hero::after,
.tool-hub-card::after,
.tool-page-head::after,
.admin-module-header::after,
.auth-card::after {
  display: none;
}

.nav-group {
  background: rgba(255, 255, 255, 0.025);
}

.nav-group[open] {
  background: rgba(255, 255, 255, 0.045);
}

.nav-group summary {
  min-height: 40px;
  padding: 8px 9px;
}

.nav-group-icon,
.nav-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
}

.nav-group-icon svg,
.nav-icon svg {
  width: 15px;
  height: 15px;
}

.nav-group-items {
  padding: 0 8px 9px 10px;
}

.nav-group-items .nav-button {
  min-height: 39px;
  padding: 7px 8px;
}

.nav-button.is-active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.84), rgba(15, 159, 143, 0.66));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.nav-standalone-button {
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.035);
  color: #eef3fb;
  font-size: 13px;
  font-weight: 800;
}

.nav-standalone-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
}

.nav-standalone-button.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.84), rgba(15, 159, 143, 0.66));
}

.workspace,
.admin-workspace {
  padding: 24px 28px 32px;
}

.topbar {
  min-height: 88px;
  padding: 15px 17px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 159, 143, 0.025) 60%, #fff);
}

.topbar h1 {
  font-size: clamp(25px, 2.4vw, 32px);
}

.primary-button,
.secondary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-button > svg,
.secondary-button > svg,
.link-button > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.metrics-grid {
  gap: 12px;
}

.metric {
  min-height: 112px;
  padding: 15px;
}

.metric-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  color: #2563eb;
  background: #f2f7ff;
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

.metric strong {
  margin: 12px 42px 3px 0;
  font-size: 27px;
}

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

.tool-hub-card {
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  column-gap: 12px;
  row-gap: 6px;
  min-height: 132px;
  padding: 17px;
}

.tool-hub-card .tool-entry-icon {
  grid-row: 1 / span 2;
}

.tool-hub-card strong {
  align-self: end;
  font-size: 16px;
}

.tool-hub-card p {
  grid-column: 2;
  line-height: 1.55;
}

.tool-entry-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.tool-entry-icon svg {
  width: 19px;
  height: 19px;
}

.custom-plan-type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.custom-plan-type {
  min-height: 96px;
  padding: 12px;
}

.user-bar {
  gap: 5px;
  margin: 8px 0 12px;
  padding: 9px 10px;
}

.user-bar span {
  font-size: 12px;
  line-height: 1.45;
}

.user-bar.is-floating {
  right: 14px;
  bottom: 14px;
  max-width: min(430px, calc(100vw - 28px));
  padding: 8px 10px;
  gap: 8px;
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.user-bar.is-floating span:nth-child(2) {
  display: none;
}

@media (max-width: 1040px) {
  .custom-plan-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .tools-hub-grid,
  .custom-plan-type-grid {
    grid-template-columns: 1fr;
  }

  .tool-hub-card {
    min-height: 118px;
  }
}

/* Employee mobile system v1 — Feishu web app */
.radar-mobile-bar,
.radar-mobile-backdrop,
.radar-mobile-nav-close,
.radar-mobile-filter-trigger,
.radar-mobile-filter-summary,
.radar-mobile-detail-close,
.radar-mobile-category-scroll,
.mobile-pagination-summary,
.emotion-mobile-expand {
  display: none;
}

.radar-mobile-category-shell {
  display: contents;
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 900px) {
  html {
    scroll-padding-top: calc(70px + env(safe-area-inset-top, 0px));
  }

  body.radar-mobile-ready {
    min-width: 0;
    overflow-x: hidden;
    background: #f7f9fc;
  }

  body.radar-mobile-nav-open,
  body.radar-mobile-detail-open {
    overflow: hidden;
  }

  body.radar-mobile-ready .radar-mobile-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: calc(60px + env(safe-area-inset-top, 0px));
    padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
  }

  body.radar-mobile-ready .radar-mobile-home {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: #111827;
    text-decoration: none;
  }

  body.radar-mobile-ready .radar-mobile-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0f9f8f);
    box-shadow: 0 7px 16px rgba(37, 99, 235, 0.16);
  }

  body.radar-mobile-ready .radar-mobile-mark svg {
    width: 21px;
    height: 21px;
  }

  body.radar-mobile-ready .radar-mobile-title {
    overflow: hidden;
    font-size: 18px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.radar-mobile-ready .radar-mobile-menu-button,
  body.radar-mobile-ready .radar-mobile-nav-close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    padding: 0;
    border: 0;
    border-radius: 11px;
    color: #172033;
    background: transparent;
    touch-action: manipulation;
  }

  body.radar-mobile-ready .radar-mobile-menu-button:active,
  body.radar-mobile-ready .radar-mobile-nav-close:active {
    background: #eef3f8;
  }

  body.radar-mobile-nav-open .radar-mobile-menu-button {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(4px + env(safe-area-inset-right, 0px));
    z-index: 70;
    color: #fff;
    background: #172033;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.24);
  }

  body.radar-mobile-nav-open .radar-mobile-bar {
    z-index: 65;
    pointer-events: none;
    border-bottom-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  body.radar-mobile-nav-open .radar-mobile-home {
    visibility: hidden;
  }

  body.radar-mobile-nav-open .radar-mobile-menu-button {
    pointer-events: auto;
  }

  body.radar-mobile-nav-open .radar-mobile-menu-button:active {
    background: #273449;
  }

  body.radar-mobile-ready .radar-mobile-menu-button svg,
  body.radar-mobile-ready .radar-mobile-nav-close svg {
    width: 25px;
    height: 25px;
  }

  body.radar-mobile-ready :is(button, a[href], summary) :is(
    svg[aria-hidden="true"],
    svg[aria-hidden="true"] *,
    [data-lucide][aria-hidden="true"],
    .radar-mobile-mark,
    .nav-group-icon,
    .nav-icon,
    .tool-entry-icon
  ) {
    pointer-events: none;
  }

  body.radar-mobile-ready .app-shell {
    display: block;
    min-height: calc(100dvh - 60px);
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    width: min(88vw, 340px);
    min-height: 100dvh;
    max-height: 100dvh;
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    transition: none;
    box-shadow: 18px 0 48px rgba(8, 15, 29, 0.24);
  }

  body.radar-mobile-nav-open .sidebar:not(.admin-sidebar) {
    transform: translateX(0);
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .brand {
    min-height: 48px;
    padding: 2px 54px 14px 2px;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .radar-mobile-nav-close {
    display: none;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .user-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 0 4px;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .nav-stack,
  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .nav-accordion {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .nav-group,
  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .nav-group[open] {
    grid-column: 1;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) .nav-group[open] .nav-group-items {
    display: grid;
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .radar-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.52);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    backdrop-filter: blur(2px);
  }

  body.radar-mobile-nav-open .radar-mobile-backdrop {
    opacity: 1;
    visibility: visible;
  }

  body.radar-mobile-ready .workspace,
  body.radar-mobile-ready .admin-workspace,
  body.radar-mobile-ready .emotion-workspace {
    width: 100%;
    padding: 14px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  body.radar-mobile-ready .workspace > .topbar,
  body.radar-mobile-ready .plan-page > .topbar {
    display: block;
    min-height: 0;
    margin: 0 0 12px;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.radar-mobile-ready .radar-mobile-dashboard-topbar {
    display: none;
  }

  body.radar-mobile-ready .workspace > .topbar > div:first-child,
  body.radar-mobile-ready .plan-page > .topbar > div:first-child {
    display: none;
  }

  body.radar-mobile-ready .topbar .top-actions {
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    padding: 1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.radar-mobile-ready .topbar .top-actions::-webkit-scrollbar {
    display: none;
  }

  body.radar-mobile-ready .topbar .top-actions > * {
    min-height: 44px;
    flex: 0 0 auto;
  }

  body.radar-mobile-ready .control-band {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.radar-mobile-ready #searchCategorySegments,
  body.radar-mobile-ready #originalCategorySegments,
  body.radar-mobile-ready .history-control-band > .segmented {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none;
    padding: 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  body.radar-mobile-ready #searchCategorySegments,
  body.radar-mobile-ready #originalCategorySegments {
    gap: 0;
    padding: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    background: #fff;
  }

  body.radar-mobile-ready .radar-mobile-category-shell {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
  }

  body.radar-mobile-ready .radar-mobile-category-shell[hidden],
  body.radar-mobile-ready .radar-mobile-category-shell:not(.is-mobile-category-active) {
    display: none !important;
  }

  body.radar-mobile-ready .radar-mobile-category-shell #searchCategorySegments,
  body.radar-mobile-ready .radar-mobile-category-shell #originalCategorySegments {
    scroll-padding-inline: 44px;
  }

  body.radar-mobile-ready .radar-mobile-category-scroll {
    position: absolute;
    top: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 42px;
    padding: 0;
    border: 0;
    color: #1d4ed8;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 0 14px 10px rgba(255, 255, 255, 0.97);
    transition: opacity 0.16s ease, visibility 0.16s ease;
    touch-action: manipulation;
  }

  body.radar-mobile-ready .radar-mobile-category-scroll.is-prev {
    left: 0;
  }

  body.radar-mobile-ready .radar-mobile-category-scroll.is-next {
    right: 0;
  }

  body.radar-mobile-ready .radar-mobile-category-scroll svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
  }

  body.radar-mobile-ready .radar-mobile-category-shell.is-at-start .radar-mobile-category-scroll.is-prev {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  body.radar-mobile-ready .radar-mobile-category-shell.is-at-end .radar-mobile-category-scroll.is-next {
    opacity: 0.32;
    visibility: visible;
    pointer-events: auto;
    cursor: not-allowed;
  }

  body.radar-mobile-ready #searchCategorySegments::-webkit-scrollbar,
  body.radar-mobile-ready #originalCategorySegments::-webkit-scrollbar,
  body.radar-mobile-ready .history-control-band > .segmented::-webkit-scrollbar {
    display: none;
  }

  body.radar-mobile-ready #searchCategorySegments .segment,
  body.radar-mobile-ready #originalCategorySegments .segment,
  body.radar-mobile-ready .history-control-band > .segmented .segment {
    min-height: 42px;
    flex: 0 0 auto;
    padding: 0 14px;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  body.radar-mobile-ready #searchCategorySegments .segment,
  body.radar-mobile-ready #originalCategorySegments .segment {
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.radar-mobile-ready #searchCategorySegments .segment.is-active,
  body.radar-mobile-ready #originalCategorySegments .segment.is-active {
    border-bottom-color: #2563eb;
    color: #2563eb;
    background: transparent;
    box-shadow: none;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 8px;
    align-items: end;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel.has-query {
    grid-template-columns: minmax(0, 1fr) 44px 48px;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel > label:first-child {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    width: auto;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel > label:first-child > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel input[type="search"] {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 16px;
  }

  body.radar-mobile-ready #keywordSearchPanel > label:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  body.radar-mobile-ready #keywordSearchPanel input[type="search"] {
    grid-column: 1;
    width: 100%;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel > .secondary-button {
    grid-column: 2;
    grid-row: 1;
    display: none;
    width: 44px;
    min-width: 44px;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel.has-query > .secondary-button {
    display: inline-flex;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel > .secondary-button svg {
    width: 18px;
    height: 18px;
  }

  body.radar-mobile-ready .radar-mobile-filter-trigger {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #172033;
    background: #fff;
    cursor: pointer;
    touch-action: manipulation;
  }

  body.radar-mobile-ready .radar-mobile-filter-host .keyword-search-panel.has-query .radar-mobile-filter-trigger {
    grid-column: 3;
  }

  body.radar-mobile-ready .radar-mobile-filter-trigger span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  body.radar-mobile-ready .radar-mobile-filter-trigger b {
    position: absolute;
    transform: translate(14px, -14px);
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    color: #fff;
    background: #2563eb;
    font-size: 10px;
    line-height: 14px;
  }

  body.radar-mobile-ready .radar-mobile-filter-trigger b:not(:empty) {
    display: block;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open .radar-mobile-filter-trigger {
    width: 82px;
    border-color: #2563eb;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 7px 18px rgba(37, 99, 235, 0.2);
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open .keyword-search-panel {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open .keyword-search-panel.has-query {
    grid-template-columns: minmax(0, 1fr) 44px 82px;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open .radar-mobile-filter-trigger span {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    color: inherit;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }

  body.radar-mobile-ready .radar-mobile-filter-summary {
    display: block;
    min-height: 40px;
    padding: 10px 12px;
    overflow: hidden;
    border: 1px solid #dce7f6;
    border-radius: 10px;
    color: #426087;
    background: #f4f7fc;
    font-size: 13px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open > .radar-mobile-filter-summary {
    display: none;
  }

  body.radar-mobile-ready .radar-mobile-filter-host:not(.is-mobile-filter-open) > .trend-filter-panel,
  body.radar-mobile-ready .radar-mobile-filter-host:not(.is-mobile-filter-open) > .emotion-type-filter {
    display: none !important;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open > .trend-filter-panel:not(.is-mobile-filter-active),
  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open > .emotion-type-filter:not(.is-mobile-filter-active) {
    display: none !important;
  }

  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open > .trend-filter-panel.is-mobile-filter-active,
  body.radar-mobile-ready .radar-mobile-filter-host.is-mobile-filter-open > .emotion-type-filter.is-mobile-filter-active {
    display: grid !important;
    gap: 12px;
    padding: 12px;
    overflow: visible;
    border: 1px solid #d9e4f2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  }

  body.radar-mobile-ready .emotion-filter-band .keyword-search-panel > label:not(:first-child) {
    display: none;
  }

  body.radar-mobile-ready .emotion-filter-band.is-mobile-filter-open .keyword-search-panel {
    grid-template-columns: minmax(0, 1fr) 82px;
  }

  body.radar-mobile-ready .emotion-filter-band.is-mobile-filter-open .keyword-search-panel > label:not(:first-child) {
    display: grid;
    grid-column: 1 / -1;
  }

  body.radar-mobile-ready .trend-filter-head {
    flex-wrap: wrap;
  }

  body.radar-mobile-ready .trend-checks,
  body.radar-mobile-ready .emotion-type-tags {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    padding: 0;
    overflow: visible;
  }

  body.radar-mobile-ready .trend-checks label,
  body.radar-mobile-ready .emotion-type-chip {
    min-height: 44px;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  body.radar-mobile-ready .purchase-filter-row,
  body.radar-mobile-ready .purchase-company-selects,
  body.radar-mobile-ready .purchase-rights-filters,
  body.radar-mobile-ready .emotion-type-filter {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .purchase-filter-row > span {
    min-height: auto;
  }

  body.radar-mobile-ready .content-grid {
    display: block;
  }

  body.radar-mobile-ready .radar-list {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body.radar-mobile-ready .radar-list > .section-head {
    display: none;
  }

  body.radar-mobile-ready[data-mode="purchase"] .radar-list > .section-head {
    display: flex;
    align-items: flex-start;
    margin: 0 0 10px;
  }

  body.radar-mobile-ready[data-mode="purchase"] .radar-list > .section-head h2 {
    padding-top: 10px;
    font-size: 15px;
  }

  body.radar-mobile-ready[data-mode="purchase"] .list-head-actions {
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }

  body.radar-mobile-ready[data-mode="purchase"] .purchase-sort-control {
    width: min(100%, 230px);
  }

  body.radar-mobile-ready[data-mode="purchase"] .purchase-sort-control > span {
    display: none;
  }

  body.radar-mobile-ready[data-mode="purchase"] .purchase-sort-control select {
    width: 100%;
    min-width: 0;
  }

  body.radar-mobile-ready .opportunity-list {
    display: grid;
    gap: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.radar-mobile-ready .opportunity {
    position: relative;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 74px;
    padding: 9px 10px;
    border: 1px solid #dde5ef;
    border-bottom-color: #e8edf3;
    border-radius: 0;
    background: #fff;
    text-align: left;
    box-shadow: none;
  }

  body.radar-mobile-ready .opportunity-list > .opportunity:first-child {
    border-radius: 13px 13px 0 0;
  }

  body.radar-mobile-ready .opportunity + .opportunity {
    border-top: 0;
  }

  body.radar-mobile-ready .opportunity:last-child {
    border-bottom-color: #dde5ef;
    border-radius: 0 0 13px 13px;
  }

  body.radar-mobile-ready .opportunity::after {
    top: 50%;
    right: 10px;
    bottom: auto;
    left: auto;
    width: 8px;
    height: 8px;
    border-top: 2px solid #667085;
    border-right: 2px solid #667085;
    background: transparent;
    transform: translateY(-50%) rotate(45deg);
  }

  body.radar-mobile-ready .opportunity.has-external-action::after {
    display: none;
  }

  body.radar-mobile-ready .opportunity.has-external-action .opportunity-main {
    padding-right: 0;
  }

  body.radar-mobile-ready .opportunity .score-ring,
  body.radar-mobile-ready .opportunity .review-mark {
    width: 42px;
    height: 42px;
  }

  body.radar-mobile-ready .opportunity .score-ring span {
    width: 33px;
    height: 33px;
    font-size: 15px;
  }

  body.radar-mobile-ready .opportunity .purchase-rank-mark {
    height: 40px;
    border-radius: 9px;
  }

  body.radar-mobile-ready .opportunity-main {
    padding-right: 14px;
  }

  body.radar-mobile-ready .opportunity-title {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 3px;
    max-height: 46px;
    overflow: hidden;
  }

  body.radar-mobile-ready .opportunity-title strong {
    display: -webkit-box;
    flex: 1 1 120px;
    min-width: 0;
    overflow: hidden;
    font-size: 15px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.radar-mobile-ready .opportunity .badge,
  body.radar-mobile-ready .opportunity .trend-pill,
  body.radar-mobile-ready .opportunity .tag-pill {
    padding: 2px 6px;
    font-size: 10px;
    line-height: 1.35;
  }

  body.radar-mobile-ready[data-mode="search"] .opportunity .badge,
  body.radar-mobile-ready[data-mode="search"] .opportunity .tag-pill {
    display: none;
  }

  body.radar-mobile-ready .opportunity .meta-row {
    display: -webkit-box;
    max-height: 31px;
    padding-right: 8px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body.radar-mobile-ready .opportunity .meta-score {
    display: none;
  }

  body.radar-mobile-ready .pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    min-height: 58px;
    gap: 8px;
    margin: 0;
    padding: 18px 8px 10px;
    background: transparent;
  }

  body.radar-mobile-ready .mobile-pagination-summary {
    display: block;
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 13px;
    text-align: center;
  }

  body.radar-mobile-ready .pagination .secondary-button {
    min-height: 44px;
  }

  body.radar-mobile-ready .proposal-panel {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: none;
    padding: calc(14px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #f7f9fc;
    box-shadow: none;
  }

  body.radar-mobile-detail-open .proposal-panel {
    display: block;
  }

  body.radar-mobile-ready .radar-mobile-detail-close {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    margin-bottom: 12px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #172033;
    background: #fff;
    font-weight: 750;
  }

  body.radar-mobile-ready .proposal-panel > .section-head {
    margin: 0 0 12px;
  }

  body.radar-mobile-ready .proposal-card {
    gap: 10px;
  }

  body.radar-mobile-ready .proposal-hero {
    padding: 16px;
    border-radius: 12px;
  }

  body.radar-mobile-ready .proposal-item {
    padding: 13px;
    border-radius: 11px;
  }

  body.radar-mobile-ready .proposal-card > .primary-button,
  body.radar-mobile-ready .proposal-card > .plan-link {
    width: 100%;
    min-height: 50px;
  }

  body.radar-mobile-ready .emotion-page-head {
    display: grid;
    gap: 14px;
    min-height: 0;
    margin: 0 0 14px;
    padding: 18px;
    border-radius: 14px;
  }

  body.radar-mobile-ready .emotion-page-head h1 {
    margin-top: 2px;
    font-size: 27px;
  }

  body.radar-mobile-ready .emotion-page-head p:last-child {
    font-size: 14px;
    line-height: 1.6;
  }

  body.radar-mobile-ready .emotion-page-head .top-actions {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
  }

  body.radar-mobile-ready .emotion-library-panel {
    padding: 14px;
    border-radius: 14px;
  }

  body.radar-mobile-ready .emotion-copy-list {
    gap: 12px;
  }

  body.radar-mobile-ready .emotion-copy-card {
    padding: 15px;
    border-radius: 13px;
  }

  body.radar-mobile-ready .emotion-copy-card blockquote {
    margin: 0 0 16px;
    padding: 0;
    font-size: 17px;
    line-height: 1.7;
  }

  body.radar-mobile-ready .emotion-core-meaning {
    margin-bottom: 10px;
  }

  body.radar-mobile-ready .emotion-mobile-expand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    margin: 0 0 10px;
    padding: 0 12px;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    color: #6d28d9;
    background: #faf7ff;
    font-weight: 750;
    text-align: left;
  }

  body.radar-mobile-ready .emotion-mobile-expand svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    transition: transform 0.18s ease;
  }

  body.radar-mobile-ready .emotion-copy-card.is-mobile-expanded .emotion-mobile-expand svg {
    transform: rotate(180deg);
  }

  body.radar-mobile-ready .emotion-copy-card:not(.is-mobile-expanded) .emotion-analysis-block {
    display: none;
  }

  body.radar-mobile-ready .emotion-analysis-block,
  body.radar-mobile-ready .emotion-preview-grid {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .emotion-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  body.radar-mobile-ready .emotion-card-footer > div:first-child {
    display: grid;
  }

  body.radar-mobile-ready .emotion-card-footer .button-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  body.radar-mobile-ready .emotion-card-footer .button-row > * {
    min-height: 46px;
  }

  body.radar-mobile-ready .tools-hub-grid,
  body.radar-mobile-ready .tool-grid,
  body.radar-mobile-ready .custom-plan-grid,
  body.radar-mobile-ready .direction-grid,
  body.radar-mobile-ready .cover-layout {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.radar-mobile-ready .tool-hub-card {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 104px;
    padding: 14px;
    border-radius: 12px;
  }

  body.radar-mobile-ready .tool-hub-card p {
    font-size: 13px;
  }

  body.radar-mobile-ready .custom-plan-intro,
  body.radar-mobile-ready .custom-plan-form-card,
  body.radar-mobile-ready .tool-card,
  body.radar-mobile-ready .tool-page-head {
    padding: 15px;
    border-radius: 13px;
  }

  body.radar-mobile-ready .custom-plan-type-grid {
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    width: 100%;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  body.radar-mobile-ready .custom-plan-type-grid::-webkit-scrollbar {
    display: none;
  }

  body.radar-mobile-ready .custom-plan-type {
    width: min(72vw, 250px);
    min-height: 96px;
    flex: 0 0 min(72vw, 250px);
    scroll-snap-align: start;
  }

  body.radar-mobile-ready .tool-action-bar,
  body.radar-mobile-ready .custom-plan-actions,
  body.radar-mobile-ready .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.radar-mobile-ready .tool-action-bar > *,
  body.radar-mobile-ready .custom-plan-actions > * {
    width: 100%;
    min-height: 48px;
  }

  body.radar-mobile-ready input,
  body.radar-mobile-ready select,
  body.radar-mobile-ready textarea {
    min-height: 44px;
    border-radius: 10px;
    font-size: 16px;
  }

  body.radar-mobile-ready textarea {
    line-height: 1.65;
  }

  body.radar-mobile-ready .history-control-band {
    gap: 10px;
  }

  body.radar-mobile-ready .history-user-note {
    min-height: 42px;
    white-space: normal;
  }

  body.radar-mobile-ready .history-item {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
  }

  body.radar-mobile-ready .history-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  body.radar-mobile-ready .history-actions > * {
    min-height: 44px;
  }

  body.radar-mobile-ready .plan-page {
    width: 100%;
    margin: 0;
    padding: 14px 14px calc(30px + env(safe-area-inset-bottom, 0px));
  }

  body.radar-mobile-ready .plan-grid,
  body.radar-mobile-ready .plan-detail-grid,
  body.radar-mobile-ready .plan-data-strip,
  body.radar-mobile-ready .emotion-plan-input-grid,
  body.radar-mobile-ready .emotion-plan-meta-strip {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .proposal-card,
  body.radar-mobile-ready .plan-data-panel,
  body.radar-mobile-ready .plan-brief-panel,
  body.radar-mobile-ready .plan-result-card {
    border-radius: 13px;
  }

  body.radar-mobile-ready .emotion-plan-style-card {
    grid-template-columns: minmax(0, 1fr);
  }

  body.radar-mobile-ready .emotion-plan-style-card > *,
  body.radar-mobile-ready #emotionPlanStylePanel,
  body.radar-mobile-ready .plan-style-category-tabs,
  body.radar-mobile-ready .plan-style-card-grid {
    min-width: 0;
    max-width: 100%;
  }

  body.radar-mobile-ready .plan-style-category-tabs {
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
  }

  body.radar-mobile-ready .plan-style-card-grid {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .plan-generate-row {
    position: sticky;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 12;
    align-items: stretch;
    padding: 10px;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
  }

  body.radar-mobile-ready .plan-generate-row .primary-button {
    width: 100%;
    min-height: 50px;
  }

  body.radar-mobile-ready .plan-result-content,
  body.radar-mobile-ready .cover-result,
  body.radar-mobile-ready .plan-readable-content {
    overflow-wrap: anywhere;
  }

  body.radar-mobile-ready .credit-center {
    padding: 0;
  }

  body.radar-mobile-ready .credit-center-card {
    width: 100%;
    max-height: 100dvh;
    border-radius: 0;
  }

  body.radar-mobile-ready .credit-center-head,
  body.radar-mobile-ready .credit-checkout-main,
  body.radar-mobile-ready .credit-checkout-side,
  body.radar-mobile-ready .credit-center-grid {
    padding-right: 16px;
    padding-left: 16px;
  }

  body.radar-mobile-ready .credit-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  body.radar-mobile-ready .radar-mobile-title {
    font-size: 17px;
  }

  body.radar-mobile-ready .history-actions {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .credit-package-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.radar-mobile-ready .sidebar:not(.admin-sidebar),
  body.radar-mobile-ready .radar-mobile-backdrop,
  body.radar-mobile-ready .emotion-mobile-expand svg {
    transition: none;
  }
}

/* Keep the emotion module compact after all legacy theme overrides. */
body .emotion-workspace {
  display: block;
  padding: 22px 26px 34px;
}
body .emotion-page-head {
  min-height: 116px;
  margin: 0 0 16px;
  padding: 22px 26px;
}
body .emotion-workspace .emotion-summary-grid {
  padding: 0;
  margin: 0 0 16px;
}
body .emotion-workspace .emotion-filter-band { margin: 0 0 16px; }
body .emotion-library-panel { padding: 22px; }
body .emotion-workspace .proposal-empty[hidden] { display: none !important; }
.emotion-pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 22px; }
.emotion-pagination a, .emotion-pagination .is-disabled { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid #dbe2ea; border-radius: 9px; background: #fff; color: #475569; text-decoration: none; }
.emotion-pagination a:hover { border-color: #8b5cf6; color: #6d28d9; }
.emotion-pagination a.is-active { border-color: #7c3aed; background: #7c3aed; color: #fff; }
.emotion-pagination .is-disabled { opacity: .45; cursor: default; }
.emotion-pagination span { color: #94a3b8; }
body .emotion-admin-summary-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.emotion-admin-item-list details { margin-top: 10px; padding-top: 9px; border-top: 1px dashed #dbe2ea; }
.emotion-admin-item-list summary { color: #64748b; font-size: 12px; cursor: pointer; }
.emotion-admin-item-list details p { color: #64748b; font-size: 13px; }

@media (max-width: 800px) {
  body .emotion-workspace { padding: 14px; }
  body .emotion-page-head { padding: 19px; }
  body .emotion-library-panel { padding: 15px; }
  body .emotion-admin-summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1080px) {
  body .app-shell {
    grid-template-columns: 1fr;
  }

  body .sidebar {
    position: relative;
    top: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  body .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  body .brand {
    padding-bottom: 10px;
  }

  body .user-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0;
  }

  body .user-bar span:nth-child(2) {
    grid-column: 1 / -1;
  }

  body .nav-stack,
  body .nav-accordion {
    grid-column: 1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body .nav-group[open] {
    grid-column: 1 / -1;
  }

  body .nav-group[open] .nav-group-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .workspace,
  body .admin-workspace {
    padding: 14px;
  }

  body .topbar {
    min-height: auto;
    padding: 14px;
  }

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

  body .metric {
    min-height: 106px;
  }

  body .metric strong {
    font-size: 23px;
  }
}

@media (max-width: 420px) {
  body .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body .user-bar.is-floating {
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-width: none;
  }
}

@media (max-width: 760px) {
  .account-admin-summary {
    grid-template-columns: 1fr;
  }

  .account-admin-head,
  .registration-request-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .account-admin-head {
    display: grid;
  }

  .account-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .account-user-row .secondary-button,
  .account-role-lock {
    grid-column: 1 / -1;
  }
}

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

.user-bar {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.user-bar span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.user-bar .secondary-button {
  min-height: 32px;
  padding: 0 10px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
}

.user-bar.is-floating {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  display: flex;
  align-items: center;
  max-width: min(560px, calc(100vw - 28px));
  margin: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.user-bar.is-floating span {
  color: var(--muted);
}

.user-bar.is-floating .secondary-button {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel-2);
}

.credit-cost-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.credit-center {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.38);
}

.credit-center-card {
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.credit-balance-panel {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.credit-balance-panel span,
.credit-balance-panel small,
.credit-mini-list small {
  color: var(--muted);
}

.credit-balance-panel strong {
  font-size: 30px;
  color: var(--ink);
}

.credit-package-grid,
.credit-center-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.credit-package-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.credit-package-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.credit-package-card span {
  font-size: 18px;
  font-weight: 900;
}

.credit-mini-list {
  display: grid;
  gap: 8px;
}

.credit-mini-list article {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

/* Recharge checkout */
.credit-center { padding: 20px; background: rgba(15, 23, 42, .62); backdrop-filter: blur(8px); }
.credit-center-card { width: min(1040px, 100%); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 20px; box-shadow: 0 30px 80px rgba(15,23,42,.28); }
.credit-center-head { display:flex; align-items:center; justify-content:space-between; padding:24px 28px 20px; border-bottom:1px solid var(--line); }
.credit-center-head h2 { margin:3px 0 4px; font-size:26px; letter-spacing:-.03em; }
.credit-center-head p, .credit-step-title p, .credit-order-focus p, .credit-payment-note p { margin:0; color:var(--muted); }
.credit-kicker { color:var(--blue); font-size:11px; font-weight:900; letter-spacing:.14em; }
.credit-close-button { width:38px; height:38px; border:1px solid var(--line); border-radius:50%; background:var(--panel-2); color:var(--muted); font-size:25px; cursor:pointer; }
.credit-checkout-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(310px,.8fr); }
.credit-checkout-main, .credit-checkout-side { padding:26px 28px; }
.credit-checkout-side { border-left:1px solid var(--line); background:#f8fafc; }
.credit-balance-panel { padding:22px 24px; border:0; border-radius:16px; color:#fff; background:linear-gradient(125deg,#18233a,#273b67); box-shadow:0 14px 30px rgba(24,35,58,.18); }
.credit-balance-panel span, .credit-balance-panel small { color:rgba(255,255,255,.7); }
.credit-balance-panel strong { color:#fff; font-size:42px; line-height:1; }
.credit-balance-panel > div { display:flex; gap:18px; margin-top:8px; }
.credit-package-section { margin-top:26px; }
.credit-step-title { display:flex; gap:12px; align-items:flex-start; }
.credit-step-title > span { display:grid; place-items:center; flex:0 0 28px; height:28px; border-radius:50%; background:#e8efff; color:#315dca; font-weight:900; }
.credit-step-title h3 { margin:2px 0 3px; font-size:16px; }
.credit-step-title p { font-size:12px; }
.credit-package-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.credit-package-card { position:relative; display:grid; gap:2px; min-height:130px; padding:18px; text-align:left; border:1.5px solid var(--line); border-radius:14px; cursor:pointer; transition:.18s ease; }
.credit-package-card:hover { transform:translateY(-2px); border-color:#9ab2ef; box-shadow:0 10px 24px rgba(49,93,202,.09); }
.credit-package-card.is-selected { border-color:#315dca; background:#f4f7ff; box-shadow:0 0 0 3px rgba(49,93,202,.09); }
.credit-package-card strong { font-size:26px; color:var(--ink); }
.credit-package-card span { color:var(--muted); font-size:13px; font-weight:700; }
.credit-package-card b { margin-top:12px; color:#315dca; font-size:15px; }
.credit-package-card em { position:absolute; top:-1px; right:-1px; padding:4px 8px; border-radius:0 12px 0 10px; background:#315dca; color:#fff; font-size:10px; font-style:normal; }
.credit-order-focus { margin-top:18px; padding:20px; border:1px solid var(--line); border-radius:16px; background:#fff; }
.credit-order-focus > strong { display:block; margin:14px 0 6px; font-size:18px; }
.credit-order-state { display:inline-flex; align-items:center; gap:7px; padding:6px 10px; border-radius:999px; color:#a16207; background:#fef3c7; font-size:12px; font-weight:900; }
.credit-order-state i { width:7px; height:7px; border-radius:50%; background:currentColor; box-shadow:0 0 0 4px rgba(161,98,7,.12); }
.credit-order-state.is-paid { color:#15803d; background:#dcfce7; }
.credit-order-state.is-processing { color:#1d4ed8; background:#dbeafe; }
.credit-order-state.is-closed { color:#64748b; background:#e2e8f0; }
.credit-order-amount { display:flex; justify-content:space-between; align-items:end; padding:15px 0; border-bottom:1px solid var(--line); }
.credit-order-amount b { font-size:25px; color:var(--ink); }
.credit-order-focus dl { margin:10px 0; }
.credit-order-focus dl div { display:flex; justify-content:space-between; gap:12px; padding:5px 0; }
.credit-order-focus dt { color:var(--muted); }
.credit-order-focus dd { margin:0; max-width:170px; overflow:hidden; text-overflow:ellipsis; font-weight:800; }
.credit-order-preview { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end; }
.credit-order-preview span { color:var(--muted); }
.credit-order-preview strong, .credit-order-preview b { text-align:right; font-size:20px; color:var(--ink); }
.credit-submit-order, .credit-refresh-order { width:100%; margin-top:18px; }
.credit-order-focus > p { margin-top:12px; font-size:12px; line-height:1.6; }
.credit-payment-qr { display:grid; justify-items:center; gap:7px; margin:15px 0 5px; padding:12px; border:1px solid #dbe5f5; border-radius:14px; background:#f7faff; }
.credit-payment-qr img { display:block; width:min(230px,100%); aspect-ratio:2/3; object-fit:cover; border-radius:10px; box-shadow:0 8px 22px rgba(37,99,235,.12); }
.credit-payment-qr strong { color:#1677ff; font-size:14px; }
.credit-payment-qr span { color:var(--muted); font-size:11px; }
.credit-notify-paid { width:100%; margin-top:12px; }
.credit-payment-note { margin-top:14px; padding:14px 15px; border-radius:12px; background:#eef2f7; }
.credit-payment-note strong { font-size:12px; }
.credit-payment-note p { margin-top:3px; font-size:11px; line-height:1.5; }
.credit-center-grid { margin:0; padding:24px 28px 28px; border-top:1px solid var(--line); background:#fff; }
.credit-center-grid h3 { font-size:15px; }

@media (max-width: 760px) {
  .credit-center { padding:0; place-items:stretch; }
  .credit-center-card { max-height:100vh; border-radius:0; }
  .credit-checkout-grid { grid-template-columns:1fr; }
  .credit-checkout-side { border-left:0; border-top:1px solid var(--line); }
  .credit-center-head, .credit-checkout-main, .credit-checkout-side, .credit-center-grid { padding-left:18px; padding-right:18px; }
  .credit-package-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.history-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.history-workspace {
  min-width: 0;
}

.history-user-note {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel);
  font-size: 13px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.history-item.is-favorite {
  border-color: rgba(200, 132, 27, 0.38);
  background: linear-gradient(90deg, rgba(200, 132, 27, 0.08), var(--panel-2) 44%);
}

.history-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.history-title strong {
  min-width: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.history-item p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.history-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.usage-control-band {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
}

.usage-active-check {
  align-self: end;
  min-height: 38px;
}

.usage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 16px;
  align-items: start;
}

.invite-admin-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.invite-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.credit-admin-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 16px;
}

.credit-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.compact-head {
  margin-bottom: 10px;
}

.credit-pricing-list,
.credit-order-list {
  display: grid;
  gap: 8px;
}

.credit-pricing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.credit-pricing-row > span {
  color: var(--ink);
  font-weight: 800;
}

.credit-pricing-row input[type="number"] {
  width: 100%;
}

.credit-package-row {
  grid-template-columns: minmax(0, 1fr) 90px 100px 90px;
}

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

.credit-order-item p,
.credit-order-item small {
  margin: 3px 0 0;
  color: var(--muted);
}

.credit-inline-form {
  display: grid;
  grid-template-columns: 110px 90px minmax(0, 1fr) auto;
  gap: 8px;
  margin: 10px 0;
}

.invite-table {
  min-width: 860px;
}

.invite-table tr {
  cursor: default;
}

.usage-table-card,
.usage-detail-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.usage-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.usage-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  background: #fff;
}

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

.usage-table th {
  color: var(--muted);
  background: var(--panel-2);
  font-weight: 800;
}

.usage-table tr {
  cursor: pointer;
}

.usage-table tr:hover,
.usage-table tr.is-selected {
  background: rgba(36, 107, 254, 0.07);
}

.usage-table td strong,
.usage-table td span,
.usage-table td small {
  display: block;
  overflow-wrap: anywhere;
}

.usage-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.usage-empty-cell {
  color: var(--muted);
  text-align: center !important;
}

.usage-recent-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.usage-plan-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.usage-plan-item strong,
.usage-plan-item p {
  overflow-wrap: anywhere;
}

.usage-plan-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 7px 0;
  color: var(--muted);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-pill {
  padding: 5px 8px;
  border-radius: 999px;
  color: #8a5b00;
  background: rgba(200, 132, 27, 0.13);
  font-size: 12px;
  font-weight: 800;
}

/* Production UI refresh */
body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 251, 0.96)),
    repeating-linear-gradient(90deg, rgba(23, 32, 51, 0.035) 0, rgba(23, 32, 51, 0.035) 1px, transparent 1px, transparent 36px),
    repeating-linear-gradient(0deg, rgba(23, 32, 51, 0.026) 0, rgba(23, 32, 51, 0.026) 1px, transparent 1px, transparent 36px);
}

button,
a,
input,
textarea,
select,
summary {
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  gap: 18px;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.18), transparent 28%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 14px),
    linear-gradient(180deg, var(--sidebar), #0c1220);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  padding: 4px 2px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.28);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-top: 2px solid rgba(255, 255, 255, 0.5);
  border-right: 2px solid rgba(255, 255, 255, 0.34);
  transform: skew(-16deg);
}

.brand strong {
  letter-spacing: 0;
}

.nav-group {
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.nav-group summary {
  min-height: 42px;
  padding: 9px 10px;
}

.nav-group[open] {
  background: rgba(255, 255, 255, 0.055);
}

.nav-group-icon,
.nav-icon {
  background: rgba(255, 255, 255, 0.12);
}

.nav-group-items {
  gap: 6px;
  padding: 0 9px 10px 12px;
  border-left: 0;
}

.nav-button {
  border-color: transparent;
  background: transparent;
}

.nav-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-button.is-active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.9), rgba(15, 159, 143, 0.72));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.workspace,
.admin-workspace {
  padding: 26px 30px 34px;
}

.topbar {
  position: relative;
  overflow: hidden;
  padding: 18px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.075), rgba(15, 159, 143, 0.045) 55%, rgba(255, 255, 255, 0.92)),
    var(--panel);
  box-shadow: var(--shadow-soft);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 18px 0 auto;
  width: 160px;
  height: 70px;
  opacity: 0.2;
  background:
    linear-gradient(90deg, transparent 0 12px, var(--blue) 12px 14px, transparent 14px 32px),
    linear-gradient(180deg, transparent 0 22px, var(--teal) 22px 24px, transparent 24px 44px);
  pointer-events: none;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.admin-topbar {
  top: 0;
  padding: 16px 18px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(255, 255, 255, 0.94)),
    var(--bg);
}

.eyebrow {
  color: var(--blue-2);
  font-size: 12px;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(25px, 2.4vw, 32px);
  line-height: 1.16;
}

.primary-button,
.secondary-button,
.icon-button {
  box-shadow: none;
}

.primary-button {
  background: linear-gradient(180deg, var(--blue), var(--blue-2));
  border-color: var(--blue-2);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.secondary-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--line-strong);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: var(--focus);
}

.metric,
.control-band,
.radar-list,
.proposal-panel,
.proposal-card,
.plan-source-card,
.plan-result-card,
.plan-brief-panel,
.workflow-panel,
.model-panel,
.admin-panel,
.admin-status-card,
.tool-card,
.tool-page-head,
.tool-hub-card,
.usage-table-card,
.usage-detail-card,
.credit-center-card,
.auth-card {
  border-color: rgba(203, 213, 225, 0.88);
  box-shadow: var(--shadow-soft);
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  padding: 16px 16px 14px;
}

.metric::before {
  content: "";
  display: block;
  width: 34px;
  height: 22px;
  margin-bottom: 10px;
  border-left: 3px solid rgba(37, 99, 235, 0.7);
  border-bottom: 3px solid rgba(15, 159, 143, 0.62);
  background:
    linear-gradient(135deg, transparent 50%, rgba(37, 99, 235, 0.14) 50%),
    linear-gradient(90deg, transparent 0 8px, rgba(15, 159, 143, 0.22) 8px 10px, transparent 10px 18px);
}

.metric::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -30px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 50%;
}

.metric strong,
.admin-status-card strong {
  letter-spacing: 0;
}

.control-band {
  box-shadow: var(--shadow-soft);
}

.segmented {
  background: #edf2f7;
}

.segment {
  font-weight: 700;
}

.segment:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.65);
}

.segment.is-active {
  box-shadow: 0 6px 16px rgba(23, 32, 51, 0.1);
}

.trend-filter-panel,
.proposal-item,
.plan-summary-card,
.tool-logic-box,
.tool-analysis-details,
.admin-status-row,
.probe-card,
.usage-plan-item,
.credit-pricing-row,
.history-item {
  background: linear-gradient(180deg, #fff, var(--panel-2));
}

.trend-checks label,
.tag-picker label,
.platform-row label,
.tool-choice-group label,
.memory-check,
.compact-check {
  background: #fff;
}

.trend-checks label:has(input:checked),
.tag-picker label:has(input:checked),
.platform-row label:has(input:checked),
.tool-choice-group label:has(input:checked) {
  border-color: rgba(37, 99, 235, 0.55);
  background: rgba(37, 99, 235, 0.075);
}

.opportunity {
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(23, 32, 51, 0.02);
}

.opportunity::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.opportunity:hover {
  border-color: rgba(37, 99, 235, 0.34);
  background: #fbfdff;
}

.opportunity.is-selected::after {
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.opportunity.is-selected {
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.score-ring,
.review-mark {
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.04);
}

.proposal-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(17, 24, 39, 0.96), rgba(37, 99, 235, 0.94) 58%, rgba(15, 159, 143, 0.9));
}

.proposal-hero::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 96px;
  height: 44px;
  opacity: 0.3;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(255, 255, 255, 0.78) 12px 14px, transparent 14px 26px),
    linear-gradient(180deg, transparent 0 10px, rgba(255, 255, 255, 0.52) 10px 12px, transparent 12px 24px);
}

.proposal-empty {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  padding: 26px;
  border: 1px dashed rgba(148, 163, 184, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 249, 252, 0.84)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(37, 99, 235, 0.055) 22px 23px),
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(15, 159, 143, 0.045) 22px 23px);
}

.empty-visual {
  filter: drop-shadow(0 12px 16px rgba(37, 99, 235, 0.14));
}

.tool-hub-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
}

.tool-hub-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 12px;
  width: 78px;
  height: 48px;
  opacity: 0.18;
  background:
    linear-gradient(135deg, transparent 0 38%, var(--blue) 39% 42%, transparent 43% 58%, var(--teal) 59% 62%, transparent 63%),
    linear-gradient(90deg, transparent 0 16px, var(--line-strong) 16px 17px, transparent 17px 34px);
}

.tool-hub-card:hover {
  transform: translateY(-1px);
}

.tool-entry-icon {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 159, 143, 0.1));
}

.tool-page-head {
  position: relative;
  overflow: hidden;
}

.tool-page-head::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 12px;
  width: 120px;
  height: 60px;
  opacity: 0.13;
  background:
    linear-gradient(90deg, var(--blue) 0 2px, transparent 2px 20px),
    linear-gradient(180deg, var(--teal) 0 2px, transparent 2px 18px);
}

.tool-page-head > * {
  position: relative;
  z-index: 1;
}

.tool-card--result .tool-textarea,
.plan-pre,
.direction-card pre,
.lyric-section pre {
  border-color: rgba(203, 213, 225, 0.9);
  background: #f9fbfe;
}

.ingest-preview pre,
.lyric-section pre,
.direction-card pre {
  background: #111827;
}

.admin-module-header {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.admin-module-header::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 104px;
  height: 48px;
  opacity: 0.14;
  background:
    linear-gradient(90deg, transparent 0 10px, var(--blue) 10px 12px, transparent 12px 24px),
    linear-gradient(180deg, transparent 0 12px, var(--teal) 12px 14px, transparent 14px 28px);
}

.admin-module-header > * {
  position: relative;
  z-index: 1;
}

.sheet-table th,
.usage-table th,
.llm-task-head,
.memory-sheet-head {
  background: #eef3f8;
}

.history-item:hover,
.usage-plan-item:hover,
.direction-card:hover,
.tool-analysis-card:hover {
  border-color: rgba(37, 99, 235, 0.28);
}

.auth-gate {
  background:
    linear-gradient(180deg, rgba(244, 247, 251, 0.92), rgba(244, 247, 251, 0.98)),
    repeating-linear-gradient(90deg, rgba(37, 99, 235, 0.08) 0, rgba(37, 99, 235, 0.08) 1px, transparent 1px, transparent 34px);
}

.auth-card {
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 18px;
  width: 96px;
  height: 72px;
  opacity: 0.11;
  background:
    linear-gradient(135deg, transparent 0 40%, var(--blue) 41% 44%, transparent 45% 58%, var(--teal) 59% 62%, transparent 63%),
    repeating-linear-gradient(90deg, transparent 0 15px, var(--line-strong) 15px 16px);
}

.credit-center-card {
  border: 1px solid var(--line);
}

.usage-summary-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.usage-summary-grid .admin-status-card {
  padding: 10px 12px;
}

.usage-summary-grid .admin-status-card strong {
  margin: 4px 0 1px;
  font-size: 20px;
}

.usage-summary-grid .admin-status-card small {
  font-size: 11px;
  line-height: 1.35;
}

.usage-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
  align-items: start;
}

.usage-employee-panel,
.usage-detail-card,
.usage-credit-direct-panel,
.invite-admin-panel,
.credit-admin-panel {
  border-color: rgba(203, 213, 225, 0.88);
}

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

.usage-employee-panel,
.usage-detail-card,
.usage-credit-direct-panel,
.invite-admin-panel,
.credit-admin-panel {
  gap: 10px;
  padding: 12px;
}

.usage-employee-panel .section-head,
.usage-detail-card .section-head,
.usage-credit-direct-panel .section-head,
.invite-admin-panel .section-head,
.credit-admin-panel .section-head,
.credit-config-card .section-head {
  margin-bottom: 0;
}

.usage-table-wrap {
  background: #fff;
}

.usage-employee-table {
  min-width: 1040px;
}

.usage-employee-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.usage-employee-table td:first-child strong {
  font-size: 14px;
}

.usage-employee-table tr.is-selected {
  box-shadow: inset 4px 0 0 var(--blue);
}

.usage-detail-card {
  position: sticky;
  top: 96px;
}

.usage-detail-empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 14px;
  border: 1px dashed rgba(148, 163, 184, 0.72);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
}

.usage-account-card,
.usage-credit-action-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

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

.usage-account-head strong,
.usage-account-head span {
  display: block;
}

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

.usage-account-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.usage-account-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.usage-account-stats article {
  padding: 8px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  background: #fff;
}

.usage-account-stats span,
.usage-account-stats small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.usage-account-stats strong {
  display: block;
  margin: 3px 0 1px;
  font-size: 18px;
}

.usage-account-meta,
.usage-policy-actions,
.usage-detail-subhead {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.usage-account-meta span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}

.usage-credit-action-box h3 {
  margin: 0;
  font-size: 15px;
}

.usage-detail-subhead {
  justify-content: space-between;
  padding-top: 4px;
}

.usage-detail-subhead span {
  color: var(--muted);
  font-size: 12px;
}

.usage-ops-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

.usage-credit-direct-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(120px, 0.7fr) minmax(110px, 0.55fr) minmax(200px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.usage-credit-direct-form .primary-button {
  justify-self: stretch;
  white-space: nowrap;
}

.credit-admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.credit-config-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.credit-config-card .section-head {
  margin-bottom: 0;
}

.credit-pricing-row {
  grid-template-columns: minmax(0, 1fr) 86px 86px;
  gap: 6px;
  padding: 8px;
  background: #f8fafc;
}

.credit-package-row {
  grid-template-columns: minmax(0, 1fr) 86px 96px 86px;
}

.credit-order-list {
  max-height: 240px;
  overflow: auto;
  padding-right: 2px;
}

.invite-create-form {
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr) auto;
  gap: 8px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 14px;
  }

  .nav-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

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

  .nav-group-items {
    padding-left: 8px;
  }

  .metrics-grid,
  .content-grid,
  .plan-grid,
  .plan-detail-grid,
  .custom-plan-grid,
  .custom-plan-type-grid,
  .cover-layout,
  .admin-workflow-board,
  .usage-layout {
    grid-template-columns: 1fr 1fr;
  }

  .proposal-panel {
    grid-column: 1 / -1;
  }

  .control-band {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .usage-control-band,
  .usage-layout,
  .usage-workbench,
  .usage-ops-grid,
  .invite-create-form,
  .credit-admin-grid {
    grid-template-columns: 1fr;
  }

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

  .usage-detail-card {
    position: static;
  }

  .usage-toolbar,
  .usage-credit-direct-form {
    grid-template-columns: 1fr;
  }

  .usage-credit-direct-form .primary-button {
    justify-self: stretch;
  }

  .nav-accordion {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .workspace {
    padding: 16px;
  }

  .topbar,
  .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics-grid,
  .content-grid,
  .plan-grid,
  .plan-detail-grid,
  .cover-layout,
  .tools-hub-grid,
  .custom-plan-grid,
  .custom-plan-type-grid,
  .tool-grid,
  .direction-grid,
  .admin-workflow-board,
  .usage-layout,
  .usage-summary-grid,
  .usage-account-stats,
  .usage-workbench,
  .usage-ops-grid,
  .credit-admin-grid {
    grid-template-columns: 1fr;
  }

  .plan-source-card {
    position: static;
  }

  .plan-page {
    width: calc(100% - 28px);
    padding: 16px 0;
  }

  .segmented {
    overflow-x: auto;
  }

  .segment {
    white-space: nowrap;
  }

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

  .original-jump-button {
    width: 100%;
  }

  .history-item,
  .user-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .credit-package-grid,
  .credit-center-grid,
  .credit-pricing-row,
  .credit-inline-form,
  .credit-order-item {
    grid-template-columns: 1fr;
  }

  .history-item {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 48px;
    height: 48px;
  }
}

/* Final visual overrides must stay last: later legacy theme rules should not reintroduce decoration. */
.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

.sidebar {
  gap: 16px;
  padding: 20px 16px;
  background: linear-gradient(180deg, #12213a, #0c1220);
}

.brand {
  gap: 11px;
  padding: 4px 2px 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(5, 12, 24, 0.24);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-mark::after,
.topbar::after,
.metric::before,
.metric::after,
.proposal-hero::after,
.tool-hub-card::after,
.tool-page-head::after,
.admin-module-header::after,
.auth-card::after {
  display: none;
}

.nav-group {
  background: rgba(255, 255, 255, 0.025);
}

.nav-group[open] {
  background: rgba(255, 255, 255, 0.045);
}

.nav-group summary {
  min-height: 40px;
  padding: 8px 9px;
}

.nav-group-icon,
.nav-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
}

.nav-group-icon svg,
.nav-icon svg {
  width: 15px;
  height: 15px;
}

.nav-group-items {
  padding: 0 8px 9px 10px;
}

.nav-group-items .nav-button {
  min-height: 39px;
  padding: 7px 8px;
}

.nav-button.is-active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.84), rgba(15, 159, 143, 0.66));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.workspace,
.admin-workspace {
  padding: 24px 28px 32px;
}

.topbar {
  min-height: 88px;
  padding: 15px 17px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(15, 159, 143, 0.025) 60%, #fff);
}

.primary-button,
.secondary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.primary-button > svg,
.secondary-button > svg,
.link-button > svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.metrics-grid {
  gap: 12px;
}

.metric {
  min-height: 112px;
  padding: 15px;
}

.metric-icon {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  color: #2563eb;
  background: #f2f7ff;
}

.metric-icon svg {
  width: 17px;
  height: 17px;
}

.metric strong {
  margin: 12px 42px 3px 0;
  font-size: 27px;
}

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

.tool-hub-card {
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  column-gap: 12px;
  row-gap: 6px;
  min-height: 132px;
  padding: 17px;
}

.tool-hub-card .tool-entry-icon {
  grid-row: 1 / span 2;
}

.tool-hub-card strong {
  align-self: end;
  font-size: 16px;
}

.tool-hub-card p {
  grid-column: 2;
  line-height: 1.55;
}

.tool-entry-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.tool-entry-icon svg {
  width: 19px;
  height: 19px;
}

.custom-plan-type-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.custom-plan-type {
  min-height: 96px;
  padding: 12px;
}

.user-bar {
  gap: 5px;
  margin: 8px 0 12px;
  padding: 9px 10px;
}

.user-bar span {
  font-size: 12px;
  line-height: 1.45;
}

.user-bar.is-floating {
  right: 14px;
  bottom: 14px;
  max-width: min(430px, calc(100vw - 28px));
  padding: 8px 10px;
  gap: 8px;
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
}

.user-bar.is-floating span:nth-child(2) {
  display: none;
}

@media (max-width: 1040px) {
  .custom-plan-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .tools-hub-grid,
  .custom-plan-type-grid {
    grid-template-columns: 1fr;
  }

  .tool-hub-card {
    min-height: 118px;
  }
}

/* Employee mobile final guard — intentionally after the desktop visual overrides. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 900px) {
  body.radar-mobile-ready .app-shell {
    display: block;
    grid-template-columns: none;
  }

  body.radar-mobile-ready .sidebar:not(.admin-sidebar) {
    padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  body.radar-mobile-ready .workspace,
  body.radar-mobile-ready .emotion-workspace {
    padding: 14px 14px calc(28px + env(safe-area-inset-bottom, 0px));
  }

  body.radar-mobile-ready .workspace > .topbar,
  body.radar-mobile-ready .plan-page > .topbar {
    min-height: 0;
    padding: 0;
    background: transparent;
  }

  body.radar-mobile-ready .workspace > .topbar.radar-mobile-dashboard-topbar {
    display: none;
  }

  body.radar-mobile-ready .tools-hub-grid {
    grid-template-columns: 1fr;
  }

  body.radar-mobile-ready .tool-hub-card {
    min-height: 104px;
    padding: 14px;
  }

  body.radar-mobile-ready .custom-plan-type-grid {
    display: flex;
    grid-template-columns: none;
  }

  body.radar-mobile-ready .opportunity.is-selected {
    border-color: #dde5ef;
    background: #fff;
    box-shadow: none;
  }

  body.radar-mobile-ready .opportunity.is-selected::after {
    background: transparent;
  }

  body.radar-mobile-ready .account-admin-workspace > .topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
  }

  body.radar-mobile-ready .account-admin-workspace > .topbar .top-actions {
    width: auto;
    justify-content: flex-end;
  }

  body.radar-mobile-ready .account-admin-workspace > .topbar .secondary-button {
    min-width: 92px;
    min-height: 44px;
  }

  body.radar-mobile-ready .account-admin-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
  }

  body.radar-mobile-ready .account-admin-summary article {
    min-width: 0;
    gap: 3px;
    padding: 12px 10px;
    border-radius: 12px;
  }

  body.radar-mobile-ready .account-admin-summary span {
    font-size: 12px;
  }

  body.radar-mobile-ready .account-admin-summary strong {
    font-size: 23px;
  }

  body.radar-mobile-ready .account-admin-summary small {
    display: none;
  }

  body.radar-mobile-ready .account-admin-panel {
    padding: 14px;
    border-radius: 12px;
  }

  body.radar-mobile-ready .account-admin-head {
    gap: 10px;
  }

  body.radar-mobile-ready .registration-request-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.radar-mobile-ready .registration-request-actions > * {
    min-height: 44px;
  }
}
