:root {
  --ink: #0f172a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --panel: #ffffff;
  --surface: #f3f4f6;
  --brand: #ef3636;
  --brand-2: #c81e1e;
  --accent: #111827;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 42px rgba(16, 24, 40, 0.08);
  --shadow-soft: 0 8px 20px rgba(16, 24, 40, 0.06);
  --glass: rgba(255, 255, 255, 0.92);
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 12px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.06);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.twogs-logo {
  width: 150px;
  height: 42px;
  border: 0;
  border-radius: 0;
  display: flex;
  align-items: flex-end;
  color: #0c0c0c;
  font-weight: 900;
  letter-spacing: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  font-size: 24px;
  line-height: 1;
  padding-top: 10px;
}

.twogs-logo.wordmark {
  font-family: "Plus Jakarta Sans", Arial Black, sans-serif;
  letter-spacing: -0.06em;
}

.twogs-logo::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 64px;
  height: 8px;
  background: var(--brand);
}

.twogs-logo.small-mark {
  width: 128px;
  height: 36px;
  font-size: 20px;
}

.brand-text strong {
  display: block;
  font-size: 19px;
  letter-spacing: 0;
  color: #111827;
}

.brand-text span,
.quote-meta span,
.small {
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #374151;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  background: #ffffff;
}

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

.nav-pill {
  border: 1px solid #fee2e2;
  background: #fff5f5;
  color: #991b1b;
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
}

.dot.online {
  background: var(--success);
}

.layout {
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 390px minmax(460px, 1fr) 480px;
  gap: 20px;
}

.workspace-layout {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 340px;
  gap: 0;
  overflow: hidden;
}

.workspace-rail {
  display: none;
  background: #ffffff;
  color: #111827;
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
}

.rail-new {
  width: 100%;
  background: #111827;
  color: #ffffff;
  box-shadow: none;
}

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

.rail-item {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  padding: 0 12px;
  color: #374151;
  background: transparent;
  font-weight: 700;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, padding-left 140ms ease;
}

.rail-item.active,
.rail-item:hover {
  background: #fff5f5;
  border-color: #fee2e2;
  color: #991b1b;
  padding-left: 16px;
}

.rail-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
}

.rail-card strong {
  color: #111827;
}

.rail-card span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

.rail-status {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6b7280;
  font-size: 13px;
}

.workspace-main {
  min-width: 0;
  background: #f3f4f6;
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.chatgpt-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.client-hero {
  margin: 18px 32px 0;
  padding: 18px 20px;
  border: 1px solid #111827;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 22px;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.12);
}

.client-hero span,
.hero-metrics span {
  display: block;
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.client-hero strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  line-height: 1.1;
  max-width: 520px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 10px;
  min-width: 310px;
}

.hero-metrics div {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-metrics strong {
  margin-top: 5px;
  font-size: 15px;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chatgpt-head {
  padding: 18px 32px 16px;
  border-bottom: 1px solid rgba(219, 228, 238, 0.86);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

.chatgpt-head h1 {
  margin: 0 0 6px;
  font-size: 30px;
  color: #111827;
  line-height: 1.08;
}

.chatgpt-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 660px;
}

.chat-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  min-width: 300px;
}

.model-badge {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 12px;
}

.prompt-strip {
  display: flex;
  gap: 10px;
  padding: 12px 32px 8px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.prompt-strip button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: #374151;
  background: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.prompt-strip button:hover {
  border-color: #fecaca;
  background: #fff5f5;
  color: #991b1b;
}

.solution-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 10px 32px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.solution-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 5px;
  min-height: 104px;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.solution-card span {
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.solution-card strong {
  color: #111827;
  font-size: 16px;
}

.solution-card small {
  color: var(--muted);
  font-weight: 800;
}

.solution-card:hover,
.solution-card.active {
  border-color: #fecaca;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
  transform: translateY(-1px);
}

.solution-card.active {
  background: #fff5f5;
}

.chatgpt-body {
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
  padding: 24px 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #f3f4f6;
}

.chat-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 15px;
  align-items: flex-start;
}

.chat-row.user {
  grid-template-columns: minmax(0, 1fr) 46px;
}

.chat-row.user .avatar {
  grid-column: 2;
  grid-row: 1;
}

.chat-row.user .chat-copy {
  grid-column: 1;
  grid-row: 1;
}

.chat-row.user .speaker {
  text-align: right;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #ffffff;
  border: 1px solid #111827;
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.chat-row.user .avatar {
  background: #f8fafc;
  color: #07185c;
  border-color: #dbe4f0;
}

.chat-copy {
  display: grid;
  gap: 7px;
}

.speaker-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.chat-row.user .speaker-line {
  justify-content: flex-end;
}

.message-meta {
  color: #8994a3;
  font-size: 11px;
  font-weight: 700;
}

.chatgpt-body .bubble {
  max-width: 760px;
  border-radius: 8px;
  border-color: var(--line);
  padding: 15px 17px;
  color: #1f2937;
}

.chat-row.user .bubble {
  margin-left: auto;
  background: #f8fbff;
  border-color: #cddaf0;
  color: #10213f;
}

.chat-row.assistant .bubble {
  background: #ffffff;
  border-left: 4px solid var(--brand);
}

.pdf-card {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.pdf-card-head {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background:
    linear-gradient(135deg, rgba(239, 54, 54, 0.08), rgba(17, 24, 39, 0.05)),
    #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.pdf-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pdf-card-head span,
.pdf-card-body span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pdf-card-head strong {
  display: block;
  margin-top: 3px;
  font-size: 18px;
}

.pdf-card-logo {
  width: 116px;
  height: 34px;
  color: #111827;
  font-size: 19px;
  margin-bottom: 8px;
}

.pdf-card-body {
  padding: 16px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.pdf-card-body .pdf-card-wide {
  grid-column: 1 / -1;
}

.pdf-card-body div {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 13px;
  background: #f8fafc;
}

.pdf-card-body strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
}

.pdf-card-body p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}

.pdf-card-body .pdf-total {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

.pdf-card-body .pdf-total span,
.pdf-card-body .pdf-total strong {
  color: #ffffff;
}

.pdf-card-body .pdf-total strong {
  font-size: 22px;
}

.pdf-card-table {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  border-collapse: collapse;
  font-size: 11px;
}

.pdf-card-table th,
.pdf-card-table td {
  border-bottom: 1px solid #d8dee8;
  padding: 8px 6px;
  text-align: left;
}

.pdf-card-table th {
  color: #111827;
  background: #f4f4f4;
  font-size: 10px;
}

.chatgpt-composer {
  position: relative;
  padding: 14px 32px 18px;
  background: #f3f4f6;
  border-top: 1px solid var(--line);
}

.composer-shell {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(16, 24, 40, 0.08);
  overflow: hidden;
}

.chatgpt-composer textarea {
  min-height: 58px;
  max-height: 170px;
  resize: vertical;
  border: 0;
  width: 100%;
  padding: 16px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

.composer-footer {
  border-top: 1px solid #e0e0e0;
  padding: 10px 10px 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.composer-footer span {
  color: #768397;
  font-size: 12px;
}

.send-button {
  min-width: 72px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.workspace-drawer {
  background: #ffffff;
  border-left: 1px solid var(--line);
  padding: 14px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.45) transparent;
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
}

.workspace-rail::-webkit-scrollbar,
.chatgpt-body::-webkit-scrollbar,
.workspace-drawer::-webkit-scrollbar {
  width: 10px;
}

.workspace-rail::-webkit-scrollbar-track,
.chatgpt-body::-webkit-scrollbar-track,
.workspace-drawer::-webkit-scrollbar-track {
  background: transparent;
}

.workspace-rail::-webkit-scrollbar-thumb,
.chatgpt-body::-webkit-scrollbar-thumb,
.workspace-drawer::-webkit-scrollbar-thumb {
  background: rgba(156, 163, 175, 0.35);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

.workspace-rail::-webkit-scrollbar-thumb:hover,
.chatgpt-body::-webkit-scrollbar-thumb:hover,
.workspace-drawer::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 114, 128, 0.55);
  border: 3px solid transparent;
  background-clip: content-box;
}

.drawer-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.drawer-card:hover {
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.08);
}

.details-card {
  padding: 0;
  overflow: hidden;
}

.details-card summary {
  padding: 15px 16px;
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
  background: #f9fafb;
  border-bottom: 1px solid #dde1e6;
  list-style: none;
}

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

.details-card summary::after {
  content: "Open";
  float: right;
  color: var(--brand);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.details-card[open] summary::after {
  content: "Edit";
}

.details-card[open] summary {
  border-bottom-color: #e5ebf2;
}

.drawer-fields {
  padding: 2px 16px 16px;
}

.field.compact {
  margin-top: 12px;
}

.field.compact textarea {
  min-height: 70px;
}

.field.compact label {
  color: #475569;
}

.drawer-fields .field input,
.drawer-fields .field select,
.drawer-fields .field textarea {
  min-height: 40px;
  background: rgba(255, 255, 255, 0.88);
}

.drawer-actions {
  display: flex;
  gap: 8px;
  padding: 14px 16px 0;
}

.workspace-drawer .quote-document {
  margin: 12px;
  padding: 14px;
  box-shadow: none;
}

.proposal-summary {
  margin: 14px 16px 0;
  padding: 14px;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  background: #fff5f5;
}

.proposal-summary span {
  display: block;
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.proposal-summary strong {
  display: block;
  margin-top: 5px;
  color: #111827;
}

.proposal-summary p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.workspace-drawer .invoice-band,
.workspace-drawer .metrics-grid {
  grid-template-columns: 1fr 1fr;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  min-width: 0;
  overflow: hidden;
}

.sidebar,
.quote-panel {
  padding: 20px;
}

.panel-title {
  margin: 0 0 6px;
  font-size: 19px;
}

.panel-kicker {
  color: var(--brand);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 12px;
}

.progress-row strong {
  color: var(--ink);
}

.progress-track {
  height: 8px;
  background: #e7edf4;
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 16px;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #111827);
  transition: width 180ms ease;
}

.field {
  margin-top: 13px;
}

.field label {
  display: block;
  color: #2f3a49;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 11px;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.composer textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12);
}

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

.actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn.primary {
  background: #111827;
  color: #fff;
  box-shadow: none;
}

.btn.secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--ink);
}

.btn.ghost {
  color: var(--brand);
  background: #ffffff;
  border-color: #fecaca;
}

.btn:hover:not(:disabled) {
  filter: brightness(0.96);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.chat-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100vh - 114px);
}

.chat-head {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(90deg, #f7fbfc 0%, #ffffff 70%),
    #ffffff;
}

.chat-head h1 {
  font-size: 23px;
  margin: 0 0 4px;
}

.messages {
  padding: 24px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fbfcfe;
}

.message {
  display: grid;
  gap: 6px;
  max-width: 84%;
}

.message.user {
  align-self: flex-end;
}

.bubble {
  border: 1px solid #dce3ec;
  border-radius: 8px;
  padding: 13px 15px;
  background: #fff;
  line-height: 1.45;
  white-space: pre-wrap;
  box-shadow: var(--shadow-soft);
}

.message.user .bubble {
  background: #123447;
  border-color: #123447;
  color: #fff;
}

.speaker {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  padding: 0 2px;
}

.message.user .speaker {
  text-align: right;
}

.composer {
  padding: 16px 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  background: #ffffff;
}

.composer textarea {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 12px;
  min-height: 52px;
  max-height: 150px;
  resize: vertical;
  background: #fbfdff;
}

.quote-document {
  border: 1px solid #cfd6df;
  background: #fff;
  padding: 24px 26px;
  margin-top: 14px;
  border-radius: 0;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.08);
  color: #111827;
  font-family: Arial, "Plus Jakarta Sans", sans-serif;
  font-size: 11px;
}

.workspace-drawer .quote-document:hover {
  box-shadow: 0 12px 26px rgba(16, 24, 40, 0.1);
}

.quote-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 18px;
  position: relative;
}

.quote-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0, var(--brand) 34%, #111827 34%, #111827 100%);
}

.quote-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quote-logo .twogs-logo {
  width: 56px;
  height: 56px;
}

.quote-logo strong {
  font-size: 19px;
}

.quote-meta {
  text-align: right;
  min-width: 140px;
  display: grid;
  align-content: start;
  gap: 3px;
}

.quote-section {
  margin-top: 20px;
}

.quotation-top {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  align-items: center;
  min-height: 52px;
}

.quotation-top h2 {
  margin: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.quote-wordmark {
  color: #111827;
  font-size: 24px;
}

.quote-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  margin-top: 22px;
}

.quote-detail-grid dl {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr);
  gap: 4px 10px;
  margin: 0;
}

.quote-detail-grid dt {
  font-weight: 800;
}

.quote-detail-grid dd {
  margin: 0;
  min-width: 0;
}

.quote-band-title {
  margin-top: 18px;
  padding: 5px 8px;
  background: #d9d9d9;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.involved-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
  padding: 10px 4px 4px;
}

.involved-grid p {
  margin: 3px 0 0;
  line-height: 1.35;
}

.price-currency-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
}

.quotation-section {
  margin-top: 0;
}

.quotation-table {
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: 10px;
}

.quotation-table th,
.quotation-table td,
.financial-table th,
.financial-table td {
  padding: 7px 5px;
  border-bottom: 1px solid #9ca3af;
}

.quotation-table th,
.financial-table th {
  background: #ffffff;
  color: #111827;
  font-size: 10px;
  line-height: 1.2;
  text-transform: none;
}

.quotation-table td strong {
  display: block;
  font-size: 10px;
}

.quotation-table td span {
  display: block;
  margin-top: 4px;
  color: #4b5563;
  font-size: 9px;
  line-height: 1.25;
}

.quotation-total-box {
  width: min(280px, 100%);
  margin: 12px 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 16px;
}

.quotation-total-box strong,
.quotation-total-box strong + span {
  font-weight: 900;
}

.quotation-empty {
  margin: 10px 0 0;
  text-align: center;
  color: #374151;
}

.financial-table {
  border: 0;
  border-radius: 0;
  border-collapse: collapse;
  font-size: 10px;
}

.quote-section h3 {
  font-size: 12px;
  margin: 0 0 8px;
  color: #991b1b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quote-section p {
  margin: 0;
  color: #2f3a49;
  line-height: 1.5;
}

.address-block {
  white-space: pre-wrap;
  margin-top: 4px !important;
  color: #5d6675 !important;
}

/* TWOG Assistant Builder layout, inspired by IBM watsonx Assistant */
.topbar {
  background: #161616;
  border-bottom-color: #393939;
}

.topbar .brand-text strong,
.topbar .twogs-logo {
  color: #ffffff;
}

.topbar .brand-text span {
  color: #c6c6c6;
}

.topbar .nav-pill,
.topbar .status {
  background: #262626;
  border-color: #525252;
  color: #f4f4f4;
  border-radius: 0;
}

.workspace-layout {
  grid-template-columns: minmax(760px, 1fr) 320px;
  background: #ffffff;
}

.workspace-rail {
  background: #f4f4f4;
  padding: 16px;
}

.flow-title {
  display: none;
}

.flow-title strong {
  font-size: 15px;
}

.flow-title span,
.start-card span {
  color: #6f6f6f;
  font-size: 12px;
}

.start-card {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.steps-label {
  display: none;
}

.step-list {
  display: none;
  gap: 16px;
  overflow: auto;
}

.step-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  min-height: 114px;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  text-align: left;
  padding: 16px 12px;
}

.step-card.active {
  border-color: #111827;
  outline: 2px solid #b9d6ff;
}

.step-card.complete {
  opacity: 0.76;
}

.step-number {
  color: #393939;
  font-weight: 700;
  align-self: center;
}

.step-card strong {
  display: block;
  color: #393939;
  font-size: 13px;
  line-height: 1.45;
}

.step-card small {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
}

.workspace-main {
  background: #ffffff;
}

.builder-shell {
  width: 100%;
  padding: 0;
  align-content: start;
  grid-template-rows: auto auto auto auto auto;
}

.builder-shell > .builder-topline,
.builder-shell > .condition-row,
.builder-shell > .builder-editor,
.builder-shell > .prompt-strip,
.builder-shell > .solution-strip,
.builder-shell > .then-row {
  display: none;
}

.builder-shell > .chatgpt-body,
.builder-shell > .chatgpt-composer {
  display: none;
}

.main-chat-panel {
  margin-top: 0;
  border-left: 0;
  border-right: 0;
  border: 1px solid #e0e0e0;
  background: #ffffff;
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  min-height: 430px;
  overflow: hidden;
}

.main-chat-head {
  min-height: 52px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.main-chat-head span {
  color: #6f6f6f;
  font-size: 12px;
}

.main-chat-panel .chatgpt-body {
  display: flex;
  overflow: auto;
  padding: 18px;
  background: #f9fafb;
}

.main-chat-panel .chatgpt-composer {
  display: block;
  padding: 12px;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

.main-chat-panel {
  min-height: 560px;
  border-color: #111827;
  box-shadow: 0 22px 50px rgba(17, 17, 17, 0.16);
}

.main-chat-head {
  background: #111111;
  color: #ffffff;
  font-size: 12px;
  border-bottom: 3px solid var(--brand);
}

.main-chat-head strong {
  font-size: 12px;
  font-weight: 800;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.chat-head-actions button {
  border: 0;
  background: transparent;
  color: #d1d5db;
  font: inherit;
  font-size: 12px;
  padding: 4px 0;
}

.chat-head-actions span {
  width: 24px;
  height: 24px;
  border: 1px solid #ef3636;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.main-chat-panel .chatgpt-body {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 66px 32px 32px;
  background:
    linear-gradient(180deg, #ffffff 0%, #ffffff 54%, #f5f5f5 100%);
}

.askhr-hero {
  width: min(640px, 100%);
  margin: 0 auto;
}

.askhr-meta {
  margin-bottom: 12px;
  color: #ef3636;
  font-size: 12px;
  font-weight: 600;
}

.askhr-hero h2 {
  margin: 0;
  color: #111111;
  font-size: 42px;
  line-height: 1.08;
  font-weight: 400;
}

.askhr-hero p {
  margin: 13px 0 24px;
  max-width: 600px;
  color: #687381;
  font-size: 13px;
  line-height: 1.65;
}

.askhr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.guided-question-card {
  margin: 0 0 22px;
  border: 1px solid #111111;
  border-top: 4px solid var(--brand);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 17, 17, 0.09);
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(180px, 0.8fr) minmax(140px, 0.5fr);
  gap: 14px;
  align-items: end;
}

.guided-question-card > div:first-child {
  display: grid;
  gap: 7px;
}

.guided-question-card span,
.package-picker span {
  color: #ef3636;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guided-question-card strong {
  color: #111111;
  font-size: 18px;
  line-height: 1.25;
}

.guided-question-card select,
.package-picker select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #111111;
  border-radius: 3px;
  background: #ffffff;
  color: #111111;
  padding: 0 12px;
  font-weight: 700;
}

.guided-freeform {
  display: grid;
  gap: 6px;
}

.guided-freeform button {
  min-height: 42px;
  border: 1px solid #111111;
  border-radius: 3px;
  background: #111111;
  color: #ffffff;
  font-weight: 900;
}

.guided-freeform small {
  color: #6b7280;
}

.package-picker {
  display: grid;
  gap: 7px;
}

.askhr-card-grid button {
  min-height: 118px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.86);
  padding: 16px;
  text-align: left;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  color: #2f3742;
}

.askhr-card-grid button:hover {
  border-color: #ef3636;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.1);
}

.askhr-card-grid strong {
  font-size: 13px;
  font-weight: 800;
}

.askhr-card-grid span {
  color: #687381;
  font-size: 12px;
  line-height: 1.45;
}

.askhr-card-grid small {
  justify-self: end;
  color: #ef3636;
  font-size: 18px;
  line-height: 1;
}

.chat-message-stack {
  width: min(640px, 100%);
  margin: 8px auto 0;
  display: grid;
  gap: 16px;
}

.main-chat-panel .chat-row {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
}

.main-chat-panel .chat-row.user {
  grid-template-columns: minmax(0, 1fr) 34px;
}

.main-chat-panel .avatar {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  box-shadow: none;
  font-size: 10px;
}

.main-chat-panel .chatgpt-body .bubble {
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  box-shadow: none;
}

.main-chat-panel .chat-row.assistant .bubble {
  border-left: 1px solid #e2e8f0;
}

.suggested-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.suggested-actions button {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #07185c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.suggested-actions button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.main-chat-panel .chatgpt-composer {
  padding: 0 32px 26px;
  background: linear-gradient(180deg, #f5f5f5 0%, #eeeeee 100%);
  border-top: 0;
}

.main-chat-panel .composer-shell {
  width: min(640px, 100%);
  margin: 0 auto;
  border-color: #edf1f7;
  border-radius: 3px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
}

.main-chat-panel .chatgpt-composer textarea {
  min-height: 52px;
  max-height: 120px;
  resize: none;
  padding: 17px 18px 6px;
  font-size: 13px;
}

.main-chat-panel .composer-footer {
  border-top: 0;
  padding: 0 12px 10px 18px;
}

.main-chat-panel .composer-footer span {
  color: transparent;
  user-select: none;
}

.main-chat-panel .send-button {
  min-width: 34px;
  width: 34px;
  height: 30px;
  border-radius: 3px;
  background: transparent;
  color: #9ca3af;
  font-size: 18px;
  box-shadow: none;
}

.proposal-toolbox {
  border: 1px solid #e0e0e0;
  background: #ffffff;
  padding: 18px;
}

.proposal-toolbox h2 {
  margin: 6px 0;
  font-size: 18px;
}

.proposal-toolbox p {
  margin: 0;
  color: #6f6f6f;
  font-size: 13px;
  line-height: 1.45;
}

.builder-topline {
  padding-top: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.builder-topline h1 {
  margin: 0;
  font-size: 16px;
}

.builder-topline span {
  color: #6f6f6f;
  font-size: 13px;
}

.condition-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 0 56px;
}

.condition-row span {
  color: #393939;
}

.condition-row button {
  border: 0;
  border-bottom: 1px solid #8d8d8d;
  background: #f4f4f4;
  min-height: 40px;
  padding: 0 18px;
  color: #393939;
}

.condition-row .set-values {
  margin-left: auto;
  border: 1px solid #0f62fe;
  color: #0f62fe;
  background: #ffffff;
  min-width: 196px;
  text-align: left;
}

.builder-editor {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.assistant-copy-editor {
  width: 100%;
  min-height: 136px;
  border: 0;
  background: #f4f4f4;
  padding: 22px;
  resize: vertical;
  color: #393939;
  font-size: 15px;
  line-height: 1.5;
}

.response-chip {
  margin-top: 12px;
  margin-left: auto;
  background: #393939;
  color: #ffffff;
  width: max-content;
  padding: 10px 16px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  transform: translateY(-34px);
}

.then-row {
  margin-top: 24px;
  border-bottom: 1px solid #8d8d8d;
  background: #f4f4f4;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  color: #0f62fe;
}

.then-row button {
  border: 0;
  background: transparent;
  color: #0f62fe;
  font-weight: 700;
}

.workspace-drawer {
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  align-content: center;
}

.preview-phone {
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.14);
  overflow: hidden;
  min-height: 560px;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.preview-head {
  min-height: 64px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
}

.preview-head button {
  border: 0;
  background: transparent;
  color: #393939;
  font-weight: 800;
  margin-left: 8px;
}

.preview-body {
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-message {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.preview-message span {
  color: #0f62fe;
  font-size: 12px;
  font-weight: 800;
}

.preview-message p {
  margin: 10px 0 0;
  color: #393939;
  font-size: 14px;
  line-height: 1.45;
}

.preview-message.user p {
  margin-left: auto;
  width: max-content;
  max-width: 90%;
  color: #ffffff;
  background: #393939;
  border-radius: 6px;
  padding: 10px 12px;
}

.preview-input {
  border-top: 1px solid #e0e0e0;
  display: grid;
  grid-template-columns: 1fr 46px;
}

.preview-input textarea {
  min-height: 48px;
  border: 0;
  resize: none;
  padding: 14px;
}

.preview-input button {
  border: 0;
  background: #ffffff;
  color: #9ca3af;
  font-size: 20px;
}

.quote-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 8px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

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

.quote-table tr:last-child td {
  border-bottom: 0;
}

.quote-table th {
  color: #334155;
  background: #f4f4f4;
  font-size: 12px;
  text-transform: uppercase;
}

.quote-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 16px;
  background: #111827;
  border: 1px solid #111827;
  color: #ffffff;
  border-radius: 12px;
  font-weight: 900;
}

.pricing-card {
  margin-top: 16px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--brand);
  background: #ffffff;
  border-radius: 14px;
  padding: 13px;
  display: grid;
  gap: 4px;
}

.pricing-card strong {
  color: var(--brand);
}

.pricing-card span {
  color: #425166;
  font-size: 13px;
  line-height: 1.4;
}

.invoice-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 12px;
  overflow: hidden;
}

.invoice-band div,
.metrics-grid div {
  padding: 12px;
  border-right: 1px solid #dde1e6;
  display: grid;
  gap: 4px;
}

.invoice-band div:last-child,
.metrics-grid div:nth-child(3n) {
  border-right: 0;
}

.invoice-band span,
.metrics-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-band strong,
.metrics-grid strong {
  font-size: 14px;
  color: var(--ink);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.next-steps {
  padding-left: 18px;
  margin: 8px 0 0;
  color: #2f3a49;
}

.model-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.workspace-layout {
  grid-template-columns: minmax(0, 1fr) clamp(280px, 23vw, 340px);
}

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

.builder-shell {
  width: 100%;
  padding: 0;
}

.main-chat-panel {
  width: 100%;
}

.askhr-hero,
.chat-message-stack,
.main-chat-panel .composer-shell {
  width: min(920px, 100%);
}

.guided-question-card {
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr) minmax(150px, 0.45fr);
}

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

@media screen {
  .workspace-layout {
    grid-template-columns: minmax(720px, 1fr) clamp(280px, 23vw, 340px) !important;
    overflow: auto;
  }

  .workspace-main {
    grid-column: auto !important;
  }

  .workspace-drawer {
    grid-column: auto !important;
    border-left: 1px solid #e0e0e0 !important;
    border-top: 0 !important;
  }
}

@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: minmax(560px, 1fr);
    overflow: auto;
  }

  .workspace-drawer {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid #dfe6ef;
    grid-template-columns: 1fr 1fr;
  }

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

  .quote-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  body,
  .app {
    overflow: auto;
    height: auto;
    min-height: 100vh;
  }

  .topbar,
  .layout,
  .chat-head {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-right {
    justify-content: flex-start;
    width: 100%;
  }

  .layout {
    grid-template-columns: 1fr;
    padding-top: 14px;
    gap: 14px;
  }

  .workspace-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .workspace-rail {
    display: none;
  }

  .chatgpt-shell {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .client-hero {
    margin: 16px 16px 0;
    padding: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .client-hero strong {
    font-size: 22px;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .chatgpt-head {
    flex-direction: column;
    padding: 20px 16px 14px;
  }

  .guided-question-card {
    grid-template-columns: 1fr;
  }

  .chat-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .prompt-strip {
    padding: 12px 16px;
  }

  .solution-strip {
    grid-template-columns: 1fr;
    padding: 10px 16px 14px;
  }

  .chatgpt-head h1 {
    font-size: 24px;
  }

  .chatgpt-body {
    padding: 18px 16px 100px;
    overflow: visible;
  }

  .chat-row,
  .chat-row.user {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .chat-row.user .avatar {
    grid-column: 1;
  }

  .chat-row.user .chat-copy {
    grid-column: 2;
  }

  .chat-row.user .speaker {
    text-align: left;
  }

  .avatar {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .chatgpt-composer {
    padding: 14px 16px 18px;
  }

  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .send-button {
    width: 100%;
  }

  .workspace-drawer {
    border-left: 0;
    padding: 14px;
    grid-template-columns: 1fr;
  }

  .pdf-card-body {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    min-height: 680px;
  }

  .message {
    max-width: 100%;
  }

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

  .model-inputs {
    grid-template-columns: 1fr;
  }

  .invoice-band,
  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .quote-header {
    flex-direction: column;
  }

  .quote-meta {
    text-align: left;
  }
}

@media screen {
  .topbar,
  .workspace-rail,
  .workspace-drawer,
  .proposal-toolbox,
  .details-card,
  .builder-topline,
  .condition-row,
  .builder-editor,
  .prompt-strip,
  .solution-strip,
  .then-row,
  .workspace-main > .chatgpt-composer {
    display: none !important;
  }

  .app {
    min-height: 100vh;
  }

  .workspace-layout {
    display: block !important;
    grid-template-columns: 1fr !important;
    height: 100vh;
    overflow: hidden !important;
    padding: 0 !important;
  }

  .workspace-main,
  .chatgpt-shell {
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
  }

  .main-chat-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
  }

  .main-chat-head {
    min-height: 64px;
    padding: 0 clamp(18px, 3vw, 42px);
  }

  .chat-head-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
  }

  .twog-chat-mark {
    position: relative;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: -0.06em;
    line-height: 1;
    padding-top: 9px;
    white-space: nowrap;
  }

  .twog-chat-mark::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 46px;
    height: 4px;
    background: var(--brand);
  }

  .chat-head-actions {
    gap: 12px;
  }

  .chat-head-actions button {
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    padding: 8px 12px;
  }

  .chat-head-actions button:hover {
    border-color: var(--brand);
    color: #ffffff;
  }

  .chat-head-actions .twog-ai-mark {
    width: 34px;
    height: 34px;
    border: 2px solid var(--brand);
    background: #ffffff;
    color: #111111;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: inset 0 -4px 0 var(--brand);
  }

  .main-chat-panel .chatgpt-body {
    padding-left: clamp(18px, 5vw, 76px);
    padding-right: clamp(18px, 5vw, 76px);
  }
}

.quote-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(17, 24, 39, 0.62);
  padding: 22px;
}

.quote-modal-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

.quote-modal-actions {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border-bottom: 1px solid #d1d5db;
}

.quote-preview-document {
  margin: 18px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #cfd6df;
  color: #111827;
  font-size: 12px;
}

.partner-service-note,
.pdf-partner-note {
  margin: 10px 0 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.partner-service-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #fff7ed;
  border-left: 4px solid var(--brand);
}

.fee-explainer {
  margin-top: 12px;
  padding: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.fee-explainer strong,
.fee-explainer span {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-weight: 800;
  text-transform: uppercase;
}

.fee-explainer p {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.product-detail-card {
  background: #ffffff;
  border: 1px solid #d8dee8;
  border-top: 4px solid var(--brand);
}

.product-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
}

.product-detail-head span,
.product-detail-card h3 {
  color: var(--brand);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.product-detail-head strong {
  color: #111827;
  display: block;
  font-size: 20px;
}

.product-detail-head p,
.product-detail-card p,
.product-detail-card li,
.product-detail-card small {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.product-detail-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

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

.product-detail-grid section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.product-detail-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.sales-guidance-card {
  border: 1px solid #d8dee8;
  background: #ffffff;
}

.sales-guidance-card summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-top: 4px solid var(--brand);
}

.sales-guidance-card summary::marker {
  color: var(--brand);
}

.sales-guidance-card summary span,
.sales-guidance-card h3 {
  color: var(--brand);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.sales-guidance-card summary strong {
  color: #111827;
  font-size: 15px;
  text-align: right;
}

.motion-strategy-band {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.4fr;
  gap: 12px;
  padding: 0 18px 16px;
}

.motion-strategy-band div {
  background: #111827;
  border-top: 3px solid var(--brand);
  color: #ffffff;
  padding: 14px;
}

.motion-strategy-band span {
  color: #fca5a5;
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.motion-strategy-band strong {
  color: #ffffff;
  display: block;
  font-size: 20px;
  margin-bottom: 4px;
}

.motion-strategy-band p {
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.motion-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 16px;
}

.motion-column {
  border: 1px solid #d8dee8;
  background: #f9fafb;
  min-width: 0;
}

.motion-column.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(239, 54, 54, 0.14);
}

.motion-column-head {
  background: #07185c;
  color: #ffffff;
  padding: 12px 14px;
}

.motion-column-head strong {
  display: block;
  font-size: 15px;
}

.motion-column-head span {
  color: #cbd5e1;
  font-size: 11px;
}

.motion-column article {
  margin: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.motion-column article.selected {
  border-color: var(--brand);
  border-left: 4px solid var(--brand);
}

.motion-column article strong {
  color: #07185c;
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.motion-column article p,
.motion-column article li {
  color: #4b5563;
  font-size: 11px;
  line-height: 1.35;
}

.motion-column article p {
  margin: 0 0 8px;
}

.motion-column article ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 16px;
}

.guidance-grid,
.guidance-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  padding: 0 18px 16px;
}

.guidance-grid section,
.guidance-lists section,
.portfolio-match-list,
.guide-rule-strip {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 14px;
}

.guidance-grid p,
.guidance-lists li,
.portfolio-match-list p,
.portfolio-match-list small,
.guide-rule-strip span {
  color: #4b5563;
  font-size: 12px;
  line-height: 1.45;
}

.persona-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.persona-list span {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 8px;
}

.guidance-lists ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.portfolio-match-list {
  margin: 0 18px 16px;
}

.portfolio-match-list article {
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
  margin-top: 10px;
}

.portfolio-match-list article strong {
  color: #111827;
  display: block;
  font-size: 13px;
}

.guide-rule-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 18px 18px;
}

.guide-rule-strip div {
  background: #ffffff;
  border-left: 3px solid var(--brand);
  padding: 10px;
}

.guide-rule-strip strong {
  color: #111827;
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

@media (max-width: 780px) {
  .product-detail-head,
  .product-detail-grid,
  .motion-strategy-band,
  .motion-chart,
  .guidance-grid,
  .guidance-lists,
  .guide-rule-strip {
    grid-template-columns: 1fr;
  }

  .sales-guidance-card summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-guidance-card summary strong {
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .workspace-rail,
  .workspace-main,
  .drawer-card:not(.details-card),
  .details-card:not([open]) summary,
  .drawer-actions,
  .drawer-fields,
  .sidebar,
  .chat-panel,
  .quote-panel > :not(.quote-document):not(.print-title) {
    display: none !important;
  }

  .workspace-layout,
  .workspace-drawer,
  .layout,
  .quote-panel {
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
    border: 0;
  }

  .details-card,
  .quote-panel,
  .quote-document {
    border: 0;
    box-shadow: none;
  }

  .details-card summary {
    display: none;
  }

  .quote-document {
    padding: 0;
    margin: 0;
  }

  .invoice-band,
  .metrics-grid,
  .quote-table {
    break-inside: avoid;
  }
}
