:root {
  --bg: #eef3f6;
  --panel: #ffffff;
  --panel-soft: #f7fafb;
  --ink: #17212b;
  --muted: #667887;
  --line: #d9e2e8;
  --blue: #1769aa;
  --blue-dark: #0f4c81;
  --cyan: #00a4b8;
  --gold: #b87500;
  --green: #198754;
  --red: #c0392b;
  --shadow: 0 18px 48px rgba(21, 48, 70, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1080px;
  background:
    linear-gradient(180deg, rgba(23, 105, 170, 0.08), transparent 310px),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  padding: 22px 24px 28px;
}

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

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

.top-actions,
.form-actions,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-switcher {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto;
  gap: 8px;
  align-items: center;
}

.customer-switcher select {
  min-width: 0;
}

.primary-btn,
.ghost-btn,
.analysis-btn,
.icon-btn {
  border: 0;
  border-radius: 7px;
  padding: 10px 14px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.primary-btn,
.analysis-btn {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(23, 105, 170, 0.24);
}

.analysis-btn {
  width: 100%;
  padding: 12px 14px;
}

.ghost-btn {
  background: #fff;
  color: var(--blue-dark);
  border: 1px solid var(--line);
  font-weight: 700;
}

.ghost-btn.slim {
  padding: 7px 10px;
  font-size: 12.5px;
}

.ghost-btn:hover,
.primary-btn:hover,
.analysis-btn:hover {
  transform: translateY(-1px);
}

.icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  background: #f2f6f8;
  font-size: 22px;
  color: var(--muted);
}

.danger-text {
  color: var(--red);
}

.api-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
}

.api-pill.ready {
  color: var(--green);
  border-color: rgba(25, 135, 84, 0.35);
  background: #f0fbf5;
}

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

.metric {
  background: var(--panel);
  border: 1px solid rgba(217, 226, 232, 0.9);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 8px 22px rgba(21, 48, 70, 0.06);
}

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

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.metric.hot strong {
  color: var(--red);
}

.metric.follow strong {
  color: var(--gold);
}

.metric.won strong {
  color: var(--green);
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(680px, 1fr);
  gap: 14px;
  min-height: calc(100vh - 170px);
}

.customer-panel,
.detail-panel,
.ai-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.customer-panel {
  padding: 16px;
}

.customer-panel {
  padding: 10px;
}

.ai-panel {
  padding: 16px;
}

.ai-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  width: min(520px, calc(100vw - 48px));
  background: var(--panel);
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(9, 22, 35, 0.24);
}

.drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.panel-head select {
  width: 128px;
}

.customer-panel .panel-head {
  gap: 8px;
  margin-bottom: 8px;
}

.customer-panel .panel-head h2 {
  font-size: 15px;
}

.customer-panel .panel-head select {
  width: 96px;
  padding-left: 8px;
  padding-right: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

textarea {
  resize: vertical;
  line-height: 1.55;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(23, 105, 170, 0.65);
  box-shadow: 0 0 0 3px rgba(23, 105, 170, 0.1);
}

.search-input {
  height: 36px;
  margin-bottom: 8px;
  font-size: 13px;
}

.customer-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 238px);
  overflow: auto;
  padding-right: 2px;
}

.customer-card {
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 6px;
  min-height: 36px;
  padding: 7px 8px 7px 9px;
  background: transparent;
  text-align: left;
  width: 100%;
}

.customer-card.active {
  border-color: rgba(23, 105, 170, 0.28);
  border-left-color: var(--blue);
  background: #eef7fc;
}

.customer-card:hover {
  background: #f6fafc;
}

.customer-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.customer-card-main span {
  color: var(--blue-dark);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card .meta,
.customer-card .tags {
  display: none;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef5fb;
  color: var(--blue-dark);
  font-size: 11.5px;
  font-weight: 700;
}

.empty-state {
  min-height: 100%;
  padding: 18px;
  color: var(--muted);
}

.empty-state h2 {
  color: var(--ink);
  margin-bottom: 8px;
}

.empty-workbench {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 100%;
}

.empty-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.empty-head p {
  max-width: 680px;
  line-height: 1.55;
}

.profile-import-zone {
  border: 1px dashed rgba(23, 105, 170, 0.38);
  border-radius: 8px;
  background: #f4fbff;
  padding: 18px;
  text-align: left;
}

.profile-import-zone strong,
.profile-import-mini strong {
  display: block;
  color: var(--blue-dark);
  font-size: 15px;
}

.profile-import-zone span,
.profile-import-mini span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

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

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

.profile-preview:empty {
  display: none;
}

.profile-preview.small {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 10px;
}

.profile-thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

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

.profile-thumb span {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 5px;
  background: rgba(15, 33, 45, 0.72);
  color: #fff;
  padding: 3px 5px;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-extract-result:empty {
  display: none;
}

.profile-result-card {
  border: 1px solid rgba(23, 105, 170, 0.22);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

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

.profile-result-head strong {
  color: var(--blue-dark);
}

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

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

.profile-fields div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 8px 10px;
}

.profile-fields span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.profile-fields strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  word-break: break-all;
}

.profile-result-card > p {
  line-height: 1.5;
  font-size: 13px;
  margin-bottom: 10px;
}

.profile-import-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed rgba(23, 105, 170, 0.35);
  border-radius: 8px;
  background: #f4fbff;
  padding: 11px 12px;
  margin-top: 12px;
}

.compact-result {
  margin-top: 10px;
}

.customer-detail {
  padding: 18px;
}

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

.detail-header h2 {
  margin-top: 8px;
  font-size: 24px;
}

.detail-header p {
  margin-top: 7px;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.followup-section {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.section-title-row h2 {
  font-size: 16px;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
}

.profile-density-btn {
  margin-left: auto;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  color: var(--blue-dark);
  border-color: rgba(23, 105, 170, 0.45);
  background: #eef7fc;
}

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

.profile-grid.compact {
  margin-top: 12px;
}

.profile-grid.compact-profile {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.profile-grid.compact-profile [data-detail-field] {
  display: none;
}

.profile-grid.compact-profile .span-2 {
  grid-column: span 2;
}

.profile-grid.compact-profile .form-actions {
  grid-column: span 4;
}

label,
.field-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

label input,
label select,
label textarea,
.field-label input,
.field-label textarea {
  margin-top: 7px;
  color: var(--ink);
  font-weight: 400;
}

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

.note-form {
  display: grid;
  grid-template-columns: 130px 1fr 110px;
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
}

.quote-section {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.quote-form {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, minmax(92px, 0.7fr)) 1.3fr 110px;
  gap: 8px;
  align-items: start;
  margin-bottom: 10px;
}

.quote-form input {
  min-width: 0;
}

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

.compact-placeholder {
  padding: 12px;
}

.quote-plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.quote-plan-card.active {
  border-color: rgba(31, 128, 94, 0.42);
  background: #f4fbf7;
}

.quote-plan-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.quote-plan-top strong,
.quote-plan-top span {
  display: block;
}

.quote-plan-top span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.quote-plan-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.green-tag {
  background: #eaf8f1;
  color: #168b63;
}

.quote-plan-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.quote-plan-metrics span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  padding: 7px 8px;
}

.quote-plan-metrics strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
}

.quote-plan-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.followup-ai-box {
  border: 1px dashed rgba(23, 105, 170, 0.34);
  border-radius: 8px;
  background: #f7fbfd;
  padding: 12px;
  margin-bottom: 14px;
}

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

.followup-ai-head strong,
.followup-ai-head span {
  display: block;
}

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

.followup-ai-head span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

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

.followup-ai-box textarea {
  min-height: 58px;
}

.followup-ai-box input[type="file"] {
  margin-top: 8px;
}

.followup-preview {
  grid-template-columns: repeat(6, minmax(70px, 1fr));
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 520px);
  overflow: auto;
}

.timeline-item {
  border-left: 3px solid var(--blue);
  background: var(--panel-soft);
  border-radius: 7px;
  padding: 10px 12px;
}

.timeline-item .time {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.field-label {
  margin-bottom: 12px;
}

.ai-sync-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(23, 105, 170, 0.28);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #f4fbff;
  padding: 11px 12px;
  margin-bottom: 12px;
}

.ai-sync-card span {
  color: var(--blue-dark);
  font-size: 12px;
  font-weight: 800;
}

.ai-sync-card strong {
  display: block;
  margin-top: 4px;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-sync-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.ai-sync-card button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  margin-bottom: 12px;
}

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

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

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

.image-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.image-preview:empty {
  display: none;
}

.image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

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

.image-thumb span {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  border-radius: 5px;
  background: rgba(15, 33, 45, 0.72);
  color: #fff;
  padding: 3px 4px;
  font-size: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.small-muted,
.hint {
  color: var(--muted);
  font-size: 12.5px;
}

.analysis-result {
  margin-top: 14px;
  flex: 1;
  min-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.ai-drawer .analysis-result {
  max-height: none;
}

.ai-drawer .field-label textarea {
  min-height: 150px;
}

.ai-drawer .image-preview {
  grid-template-columns: repeat(3, 1fr);
}

.placeholder {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: var(--panel-soft);
  line-height: 1.6;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 8px;
  background: #fff;
}

.result-card.priority {
  border-color: rgba(23, 105, 170, 0.35);
  background: #f4fbff;
}

.pricing-card {
  border-color: rgba(31, 128, 94, 0.38);
  background: #f4fbf7;
}

.pricing-card.danger {
  border-color: rgba(194, 63, 52, 0.35);
  background: #fff7f5;
}

.muted-pricing {
  background: #fbfcfd;
}

.pricing-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.pricing-mini-grid span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 12px;
  padding: 8px;
}

.pricing-mini-grid strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  margin-top: 3px;
}

.sticky-result {
  position: sticky;
  top: 0;
  z-index: 3;
  box-shadow: 0 8px 18px rgba(21, 48, 70, 0.08);
}

.priority-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.priority-head span {
  min-width: 54px;
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  text-align: center;
  padding: 5px 8px;
  font-weight: 800;
}

.result-card h3 {
  margin-bottom: 6px;
  font-size: 15px;
  color: var(--blue-dark);
}

.result-card p,
.result-card li {
  color: #26343f;
  line-height: 1.55;
  font-size: 14px;
}

.probability {
  height: 9px;
  border-radius: 999px;
  background: #e7edf2;
  overflow: hidden;
  margin-top: 9px;
}

.probability div {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-tag {
  border-radius: 999px;
  background: #eef7fc;
  color: var(--blue-dark);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.talk-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.talk-card {
  border: 1px solid rgba(23, 105, 170, 0.25);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f6fbff);
  padding: 10px 12px;
}

.talk-card h3 {
  margin: 0 0 5px;
  color: var(--blue-dark);
  font-size: 14px;
}

.talk-card p {
  margin: 0;
  line-height: 1.5;
  font-size: 13.5px;
}

.copy-reply {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(25, 135, 84, 0.28);
  border-radius: 8px;
  background: #f2fbf6;
  padding: 11px 12px;
  margin-bottom: 8px;
}

.copy-reply h3 {
  margin: 0 0 5px;
  color: var(--green);
  font-size: 15px;
}

.copy-reply p {
  color: #1f3a2d;
  line-height: 1.55;
  font-size: 14px;
}

.compact-copy {
  margin-top: 8px;
}

.message-line {
  margin: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.message-line span {
  display: inline-block;
  border-radius: 999px;
  background: #eef7fc;
  color: var(--blue-dark);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.message-line p {
  margin-top: 6px;
  line-height: 1.5;
}

.message-line em,
.plan-step em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.plan-step {
  margin: 10px 12px;
  border-left: 3px solid var(--cyan);
  border-radius: 7px;
  background: #f7fafb;
  padding: 10px 12px;
}

.plan-step strong {
  color: var(--blue-dark);
}

.plan-step p {
  margin-top: 5px;
  line-height: 1.5;
}

.plan-step blockquote {
  margin: 7px 0 0;
  border-left: 3px solid rgba(23, 105, 170, 0.25);
  padding-left: 9px;
  color: #26343f;
  line-height: 1.5;
}

.coach-box {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 13px;
}

.detail-coach {
  margin: 14px 0 0;
  border-top: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.coach-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
}

.coach-head h2 {
  font-size: 16px;
}

.coach-btn {
  width: 100%;
  margin-top: 8px;
}

.coach-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 10px;
  align-items: start;
}

.detail-coach .coach-btn {
  margin-top: 0;
  min-height: 74px;
}

.coach-result {
  margin-top: 10px;
  max-height: 180px;
  overflow: auto;
}

.detail-coach .coach-result {
  margin-top: 10px;
  max-height: min(42vh, 380px);
}

.coach-answer {
  display: grid;
  gap: 8px;
}

.coach-answer > h3 {
  color: var(--blue-dark);
  font-size: 14px;
}

.coach-answer > p {
  line-height: 1.5;
  font-size: 13.5px;
}

.warning-text {
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: 8px;
  background: #fff6f5;
  color: var(--red);
  padding: 9px 10px;
  line-height: 1.45;
  font-size: 12.5px;
}

.result-fold {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
  padding: 0;
  overflow: hidden;
}

.result-fold summary {
  list-style: none;
  cursor: pointer;
  color: var(--blue-dark);
  font-weight: 800;
  padding: 10px 12px;
  background: #f7fafb;
}

.result-fold summary::-webkit-details-marker {
  display: none;
}

.result-fold summary::after {
  content: "展开";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.result-fold[open] summary::after {
  content: "收起";
}

.result-fold > p,
.result-fold > ul,
.result-fold > .result-card {
  margin: 10px 12px;
}

.result-fold .result-card {
  box-shadow: none;
}

.modal {
  width: min(760px, calc(100vw - 48px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 30px 80px rgba(15, 35, 50, 0.25);
}

.modal.wide {
  width: min(880px, calc(100vw - 48px));
}

.modal::backdrop {
  background: rgba(9, 22, 35, 0.35);
}

.modal form {
  padding: 18px;
  max-height: calc(100vh - 72px);
  overflow: auto;
}

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

.modal-head p {
  margin-top: 5px;
}

.profile-modal-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.model-picker-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 7px;
}

.model-picker-row input {
  margin-top: 0;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: none;
  max-width: 360px;
  border-radius: 8px;
  padding: 12px 14px;
  background: #17212b;
  color: #fff;
  box-shadow: var(--shadow);
  z-index: 20;
}

.toast.show {
  display: block;
}

.hidden {
  display: none !important;
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 230px minmax(500px, 1fr);
  }
}
