/*
 * Roc Quote — Business Demo workbench styles.
 * Platform (Roc Web Studio) look: Roc blue, neutral surfaces.
 */
:root {
  --brand: #2355ee;
  --brand-dark: #132243;
  --ink: #1a2540;
  --muted: #657088;
  --bg: #f1f5ff;
  --line: #dce2ee;
  --card: #ffffff;
  --amber: #b97b12;
  --amber-bg: #fff7e6;
  --green: #1c7c46;
  --green-bg: #f2faf5;
  --indigo: #4c50c9;
  --indigo-bg: #eef0ff;
  --danger: #c0392b;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15.5px/1.6 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
a { color: var(--brand); }
:focus-visible { outline: 3px solid #7ea0ff; outline-offset: 2px; }

.demo-banner {
  display: block; text-align: center; padding: 9px 16px; background: #fffdf5;
  border-bottom: 1px solid #ecd39c; color: #6b5210; font-size: 13.5px; text-decoration: none;
}
.demo-banner i { font-style: normal; }

.wb-header { background: var(--card); border-bottom: 1px solid var(--line); }
.wb-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 24px; flex-wrap: wrap; }
.wb-kicker { font: 700 11.5px 'Manrope', sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand); margin: 0 0 4px; }
.wb-header h1 { font: 800 clamp(22px, 3vw, 30px)/1.15 'Manrope', sans-serif; letter-spacing: -0.015em; margin: 0; color: var(--brand-dark); }
.wb-header-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wb-header-links a { font-weight: 600; font-size: 14px; text-decoration: none; color: var(--brand-dark); }
.wb-header-links a:hover { color: var(--brand); }
.cta-real { background: var(--brand); color: #fff !important; padding: 10px 16px; border-radius: 999px; font-weight: 700; }
.cta-real:hover { background: var(--brand-dark); }

.wb-intro { max-width: 860px; margin: 22px 0 18px; color: var(--muted); }
.wb-noscript { background: var(--amber-bg); border: 1px solid #ecd39c; color: #6b5210; padding: 14px 16px; border-radius: 12px; }
.wb-notice { background: var(--amber-bg); border: 1px solid #ecd39c; color: #6b5210; border-radius: 10px; padding: 10px 14px; margin: 16px 0 0; font-size: 14px; }
.wb-flash { background: var(--green-bg); border: 1px solid #bfe3cd; color: var(--green); border-radius: 10px; padding: 10px 14px; margin: 16px 0 0; font-size: 14px; font-weight: 600; }

/* Brand line + tabs */
.wb-brandline { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.wb-tabs { display: inline-flex; background: #e3eafb; border-radius: 999px; padding: 4px; gap: 4px; }
.wb-tab {
  border: 0; background: transparent; font: 700 14px 'DM Sans', sans-serif; color: var(--brand-dark);
  padding: 8px 18px; border-radius: 999px; cursor: pointer;
}
.wb-tab.is-active { background: var(--brand); color: #fff; }
.wb-brandname { font-size: 13px; color: var(--muted); font-weight: 600; }

.wb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.wb-view-switch { display: inline-flex; gap: 6px; }
.wb-view-btn {
  border: 1.5px solid var(--line); background: var(--card); font: 600 14px 'DM Sans', sans-serif;
  color: var(--brand-dark); padding: 8px 14px; border-radius: 10px; cursor: pointer;
}
.wb-view-btn.is-active { border-color: var(--brand); color: var(--brand); background: #eef2ff; }
.wb-toolbar-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wb-ghost-link { font-size: 14px; font-weight: 600; }

.wb-btn {
  border: 0; cursor: pointer; font: 700 14px 'DM Sans', sans-serif; padding: 9px 16px;
  border-radius: 999px; background: var(--brand); color: #fff; text-decoration: none;
}
.wb-btn:hover { background: var(--brand-dark); }
.wb-btn-ghost { background: var(--card); color: var(--brand-dark); border: 1.5px solid var(--line); }
.wb-btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--card); }
.wb-btn-small { padding: 6px 12px; font-size: 13px; }
.wb-btn-primary { background: var(--brand); }
.wb-danger { color: var(--danger); }
.wb-danger:hover { border-color: var(--danger); color: var(--danger); }

/* Inbox grid */
.wb-grid { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 22px; align-items: start; padding-bottom: 40px; }
.wb-col-title { font: 800 15px 'Manrope', sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.wb-list { display: flex; flex-direction: column; gap: 10px; }
.wb-lead {
  display: flex; flex-direction: column; gap: 4px; text-align: left; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 16px; font: inherit; color: inherit;
}
.wb-lead:hover { border-color: var(--brand); }
.wb-lead.is-selected { border-color: var(--brand); box-shadow: 0 1px 2px rgba(19,34,67,0.06), 0 8px 22px rgba(19,34,67,0.08); }
.wb-lead-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wb-lead-ref { font: 800 14px 'Manrope', sans-serif; color: var(--brand-dark); }
.wb-lead-name { font-weight: 700; font-size: 14.5px; }
.wb-lead-sub { font-size: 13px; color: var(--muted); }
.wb-lead-date { font-size: 12.5px; color: var(--muted); }
.wb-empty { color: var(--muted); font-size: 14.5px; }

.wb-status { font: 700 11px 'Manrope', sans-serif; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.wb-status-blue { background: #e7edff; color: #2749b8; }
.wb-status-amber { background: var(--amber-bg); color: var(--amber); }
.wb-status-indigo { background: var(--indigo-bg); color: var(--indigo); }
.wb-status-green { background: var(--green-bg); color: var(--green); }
.wb-status-gray { background: #eef0f5; color: var(--muted); }

/* Detail */
.wb-detail { min-width: 0; }
.wb-lead-detail { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 22px; display: grid; gap: 18px; }
.wb-detail-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.wb-detail-ref { font: 800 20px 'Manrope', sans-serif; margin: 0 0 2px; color: var(--brand-dark); }
.wb-detail-meta { margin: 0; font-size: 13.5px; color: var(--muted); }
.wb-status-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.wb-history { margin: -8px 0 0; font-size: 12.5px; color: var(--muted); }
.wb-contact, .wb-request, .wb-review, .wb-snapshot, .wb-revisions { border-top: 1px solid var(--line); padding-top: 14px; }
.wb-contact h4, .wb-request h4, .wb-review h4, .wb-snapshot h4, .wb-revisions h4, .wb-editor summary {
  font: 800 13px 'Manrope', sans-serif; letter-spacing: 0.07em; text-transform: uppercase; color: var(--brand-dark); margin: 0 0 8px;
}
.wb-contact p { margin: 0; font-size: 14.5px; }
.wb-fictional { font-size: 10.5px; color: var(--brand); text-transform: uppercase; letter-spacing: 0.06em; }
.wb-request-list { margin: 0 0 8px; padding-left: 20px; font-size: 14.5px; display: grid; gap: 4px; }
.wb-request-date, .wb-request-notes { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.wb-review { background: var(--amber-bg); border: 1px solid #ecd39c; border-radius: 12px; padding: 14px 16px; }
.wb-review p { margin: 4px 0 0; font-size: 14px; color: #6b5210; }

.wb-lines { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.wb-lines td { padding: 7px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.wb-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.wb-line-detail { display: block; font-size: 12.5px; color: var(--muted); }
.wb-discount { color: var(--green) !important; }
.wb-snapshot-total { font-weight: 800; font-family: 'Manrope', sans-serif; margin: 10px 0 0; color: var(--brand-dark); }
.wb-snapshot-note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.wb-snapshot-rules { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }

/* Quote editor */
.wb-editor { border-top: 1px solid var(--line); padding-top: 14px; }
.wb-editor summary { cursor: pointer; }
.wb-editor-body { display: grid; gap: 12px; margin-top: 12px; }
.wb-edit-lines { display: grid; gap: 8px; }
.wb-edit-line { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 8px; align-items: center; }
.wb-input {
  width: 100%; font: inherit; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: inherit;
}
.wb-input:focus { border-color: var(--brand); outline: none; }
.wb-line-amount { text-align: right; font-variant-numeric: tabular-nums; }
.wb-remove { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--muted); }
.wb-remove:hover { border-color: var(--danger); color: var(--danger); }
.wb-add-line { justify-self: start; border: 2px dashed var(--line); background: transparent; border-radius: 10px; padding: 8px 14px; font: 700 13.5px 'DM Sans', sans-serif; color: var(--brand-dark); cursor: pointer; }
.wb-add-line:hover { border-color: var(--brand); color: var(--brand); }
.wb-edit-total { font: 800 16px 'Manrope', sans-serif; margin: 0; color: var(--brand-dark); }
.wb-editor-note { margin: 0; font-size: 13px; color: var(--muted); }
.wb-label { display: grid; gap: 6px; font: 700 13.5px 'DM Sans', sans-serif; }

.wb-revision { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.wb-revision:last-child { border-bottom: 0; }
.wb-rev-title { font-weight: 800; font-family: 'Manrope', sans-serif; color: var(--brand-dark); }
.wb-rev-meta { font-size: 12.5px; color: var(--muted); margin-right: auto; }

/* Pricing view */
.wb-pricing { display: grid; gap: 16px; max-width: 880px; padding-bottom: 40px; }
.wb-pricing-note { background: #eef2ff; border: 1px solid #c9d6f7; color: #27408f; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin: 0; }
.wb-price-card { background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.wb-price-card h3 { font: 800 15.5px 'Manrope', sans-serif; margin: 0 0 12px; color: var(--brand-dark); }
.wb-price-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: center; padding: 5px 0; font-size: 14.5px; }
.wb-price-input { text-align: right; font-variant-numeric: tabular-nums; }
.wb-tier-table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.wb-tier-table th, .wb-tier-table td { padding: 7px 10px 7px 0; text-align: left; border-bottom: 1px dashed var(--line); }
.wb-tier-table thead th { font: 700 12.5px 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.wb-tier-table tbody th { font-weight: 600; color: var(--brand-dark); }
.wb-tier-table td { min-width: 130px; }

/* Print sheet */
.wb-print-sheet { position: fixed; inset: 0; background: rgba(19, 34, 67, 0.55); overflow: auto; z-index: 100; padding: 26px 14px 60px; }
.wb-print-bar { max-width: 760px; margin: 0 auto 12px; display: flex; gap: 10px; justify-content: flex-end; }
.wb-print-paper {
  max-width: 760px; margin: 0 auto; background: #fff; border-radius: 6px; padding: 46px 52px;
  box-shadow: 0 20px 60px rgba(10, 20, 40, 0.35); color: #14213a; font-size: 14.5px;
}
.wbpq-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--brand-dark); padding-bottom: 16px; }
.wbpq-brand { font: 800 22px 'Manrope', sans-serif; margin: 0; color: var(--brand-dark); }
.wbpq-sub { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.wbpq-ref { font: 800 14px 'Manrope', sans-serif; margin: 0; }
.wbpq-date { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.wbpq-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 18px 0; }
.wbpq-parties h4 { margin: 0 0 4px; font: 700 12px 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.wbpq-parties p { margin: 0; }
.wbpq-lines { width: 100%; border-collapse: collapse; }
.wbpq-lines th { text-align: left; font: 700 12px 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 2px solid #14213a; padding: 8px 0; }
.wbpq-lines th.wbpq-num, .wbpq-lines td.wbpq-num { text-align: right; font-variant-numeric: tabular-nums; }
.wbpq-lines td { padding: 10px 0; border-bottom: 1px solid #e2e7f2; }
.wbpq-detail { display: block; font-size: 12.5px; color: var(--muted); }
.wbpq-total { font: 800 20px 'Manrope', sans-serif; text-align: right; margin: 16px 0 0; }
.wbpq-notes { margin: 14px 0 0; font-size: 13.5px; color: #33415e; }
.wbpq-terms { margin-top: 26px; border-top: 1px solid #e2e7f2; padding-top: 14px; }
.wbpq-terms h4 { margin: 0 0 4px; font: 700 12px 'Manrope', sans-serif; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.wbpq-terms p { margin: 0; font-size: 12px; color: var(--muted); }

/* Print media: only the formal quote paper */
@media print {
  body > .demo-banner, body > .wb-header, body > main, body > .wb-footer { display: none !important; }
  .wb-print-sheet { position: static; background: none; padding: 0; }
  .wb-print-bar { display: none !important; }
  .wb-print-paper { box-shadow: none; border-radius: 0; max-width: none; padding: 10mm 12mm; }
}

/* Responsive */
@media (max-width: 960px) {
  .wb-grid { grid-template-columns: 1fr; }
  .wb-print-paper { padding: 28px 22px; }
}
@media (max-width: 640px) {
  .wb-edit-line { grid-template-columns: minmax(0, 1fr) 110px auto; }
  .wb-price-row { grid-template-columns: 1fr; gap: 4px; }
  .wb-header-inner { padding: 16px 20px; }
}

/* R02/R06: inline draft errors; R08: contained table scroll on phones */
.wb-draft-error {
  background: #fdeceb; border: 1.5px solid #eab6b2; color: #8c2f28;
  border-radius: 10px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin: 0 0 8px;
}
.wb-table-scroll { overflow-x: auto; max-width: 100%; }
.wb-tier-table { min-width: 430px; }
@media (max-width: 640px) {
  .wb-tier-table { min-width: 430px; } /* scrolls inside the card, never widens the page */
  .wb-price-card { overflow: hidden; }
}
