/* Platform shell only: the quotation parsing, calculation and export script stays in the original page unchanged. */
:root {
  --brand: #0f172a;
  --brand-dark: #0f172a;
  --brand-line: #e2e8f0;
  --brand-soft: #f7f9fb;
  --red: #0051d5;
  --red-dark: #003ea8;
  --paper: #f7f9fb;
}

html,
body.quote-standalone {
  min-width: 1180px;
  min-height: 100%;
  overflow: auto;
  background: #f7f9fb;
  color: #191c1e;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.quote-standalone {
  background-image: none;
}

body.quote-standalone .quote-standalone-shell {
  min-height: 100vh;
  margin-left: 260px;
  background: #f7f9fb;
}

body.quote-standalone .quote-demo-shell {
  min-height: 100vh;
  background: #f7f9fb;
}

.platform-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 64px;
  padding: 0 32px;
  color: #0f172a;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: none;
}

.platform-brand {
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.platform-logo {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: #0f172a;
  color: #ffffff;
}

.platform-brand-text strong {
  color: #0f172a;
  font-size: 15px;
}

.platform-brand-text span {
  color: #64748b;
  font-size: 10px;
  letter-spacing: .05em;
}

.platform-nav {
  display: none;
}

.platform-tools {
  justify-self: end;
  gap: 16px;
}

.platform-search {
  min-width: 260px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  background: #f7f9fb;
  color: #64748b;
  font-size: 12px;
}

.platform-user {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.platform-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
}

.platform-body {
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 28px 32px 36px;
  gap: 18px;
}

.platform-breadcrumb {
  color: #64748b;
  font-size: 12px;
  line-height: 16px;
}

.platform-pagehead {
  padding: 20px 24px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: none;
}

.platform-pagehead-title h1 {
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
}

.status-badge {
  height: 24px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
}

.platform-meta {
  gap: 18px;
  color: #64748b;
  font-size: 12px;
}

.platform-meta strong {
  color: #334155;
  font-weight: 600;
}

.toolbar-btn,
.toolbar-btn-primary {
  height: 34px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.toolbar-btn {
  border-color: #e2e8f0;
  color: #334155;
}

.toolbar-btn-primary {
  background: #0051d5;
}

.quote-demo {
  grid-template-columns: minmax(292px, .82fr) minmax(530px, 1.64fr) minmax(260px, .76fr);
  gap: 18px;
  min-height: 710px;
}

.quote-tool,
.quote-preview,
.quote-rules {
  border-color: #e2e8f0;
  border-radius: 4px;
  box-shadow: none;
}

.quote-tool,
.quote-rules {
  padding: 16px;
}

.quote-tool h3,
.quote-rules h3,
.quote-preview-title strong {
  color: #0f172a;
}

.quote-preview-head {
  padding: 14px 16px;
}

.quote-preview-title strong {
  font-size: 18px;
}

.quote-preview-stage {
  padding: 14px;
  background: #f2f4f6;
}

.quote-preview-pill,
.quote-file-name,
.quote-field input,
.quote-field select,
.quote-field textarea,
.rule-chip,
.summary-card,
.adjust-note {
  border-color: #e2e8f0;
  border-radius: 4px;
}

.quote-field input,
.quote-field select,
.quote-field textarea {
  color: #1e293b;
}

.quote-actions button {
  border-radius: 4px;
}

.quote-actions button:not(.secondary) {
  background: #0051d5;
}

.quote-flow {
  border-color: #e2e8f0;
  border-radius: 4px;
  box-shadow: none;
}

@media (max-width: 1280px) {
  .quote-demo { grid-template-columns: 292px minmax(520px, 1fr); }
  .quote-rules { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  html,
  body.quote-standalone { min-width: 0; }
  body.quote-standalone .quote-standalone-shell { margin-left: 0; }
  .platform-topbar { padding: 0 16px; }
  .platform-search,
  .platform-user span { display: none; }
  .platform-body { padding: 20px 16px 28px; }
  .platform-pagehead-top { align-items: flex-start; flex-direction: column; }
  .quote-demo { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .quote-rules { grid-column: auto; }
}
