:root {
  --indigo: #6366f1;
  --indigo-dark: #4f46e5;
  --indigo-light: #eef2ff;
  --violet: #8b5cf6;
  --ink: #1e1b2e;
  --ink-soft: #4b4869;
  --muted: #8b88a3;
  --line: #ececf3;
  --bg: #fafafe;
  --surface: #ffffff;
  --green: #10b981;
  --green-light: #ecfdf5;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); height: 100vh; display: flex; flex-direction: column; color: var(--ink); -webkit-font-smoothing: antialiased; }

/* AUTH */
#auth { display: flex; align-items: center; justify-content: center; height: 100vh; background: radial-gradient(circle at 30% 20%, #4f46e5 0%, #312e81 45%, #1e1b4b 100%); }
.auth-box { background: var(--surface); padding: 2.75rem; border-radius: 20px; width: 400px; box-shadow: 0 30px 80px rgba(49,46,129,0.35); }
.auth-logo { font-size: 26px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-logo span { background: linear-gradient(135deg, var(--indigo), var(--violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-box p { color: var(--muted); margin-bottom: 28px; font-size: 14px; }
.auth-box label { font-size: 12px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; display: block; }
input { width: 100%; padding: 12px 15px; border: 1.5px solid var(--line); border-radius: 11px; margin-bottom: 16px; font-size: 14px; font-family: inherit; transition: all 0.15s; outline: none; background: #fcfcff; }
input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); background: #fff; }
.btn { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: white; border: none; border-radius: 11px; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: inherit; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(99,102,241,0.35); }
.error { color: #ef4444; font-size: 13px; margin-top: 4px; min-height: 18px; }

/* APP */
#app { display: none; flex-direction: column; height: 100vh; }
.main-area { flex: 1; display: flex; min-height: 0; }
.chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sidebar { width: 240px; border-right: 1px solid var(--line); background: #fcfcfe; display: flex; flex-direction: column; padding: 14px 12px; flex-shrink: 0; }
.new-chat-btn { width: 100%; padding: 10px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; border: none; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; margin-bottom: 14px; }
.sidebar-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 0 4px 8px; }
.chat-list { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.chat-item { padding: 9px 10px; border-radius: 9px; cursor: pointer; transition: background 0.12s; }
.chat-item:hover { background: var(--indigo-light); }
.chat-item.active { background: var(--indigo-light); }
.chat-item-title { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.chat-item-date { font-size: 10px; color: var(--muted); margin-top: 2px; }
/* Rating buttons */
.rating { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.rate-btn { background: transparent; border: 1px solid var(--line); border-radius: 7px; width: 28px; height: 26px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); transition: all 0.15s; }
.rate-btn:hover { border-color: var(--indigo); color: var(--indigo); }
.rate-btn.up.active { background: var(--green-light); border-color: var(--green); color: var(--green); }
.rate-btn.down.active { background: #fef2f2; border-color: #ef4444; color: #ef4444; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 24px; height: 60px; display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-logo { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.topbar-logo span { background: linear-gradient(135deg, var(--indigo), var(--violet)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.status-pill { font-size: 11px; font-weight: 500; color: var(--green); background: var(--green-light); padding: 4px 10px; border-radius: 20px; display: flex; align-items: center; gap: 5px; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--indigo), var(--violet)); color: white; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.btn-ghost { background: transparent; border: 1px solid var(--line); padding: 7px 14px; font-size: 13px; color: var(--ink-soft); border-radius: 9px; cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.15s; }
.btn-ghost:hover { background: var(--bg); border-color: var(--muted); }

/* Admin page */
.admin-page { display: none; flex-direction: column; height: 100vh; background: var(--bg); }
.admin-topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 24px; height: 60px; display: flex; align-items: center; justify-content: space-between; }
.admin-main { flex: 1; display: flex; min-height: 0; }
.admin-nav { width: 200px; border-right: 1px solid var(--line); background: #fcfcfe; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }
.admin-nav-item { text-align: left; padding: 10px 14px; border-radius: 9px; border: none; background: transparent; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--ink-soft); cursor: pointer; }
.admin-nav-item:hover { background: var(--indigo-light); }
.admin-nav-item.active { background: var(--indigo-light); color: var(--indigo-dark); font-weight: 600; }
.admin-content { flex: 1; overflow-y: auto; padding: 26px 32px; }
.admin-h2 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.admin-add { display: flex; gap: 8px; margin-bottom: 8px; max-width: 480px; }
.admin-add input { margin: 0; flex: 1; }
.btn-sm-solid { background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; border: none; border-radius: 10px; padding: 0 16px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; }
.admin-feedback { font-size: 13px; min-height: 18px; margin-bottom: 12px; }
.admin-feedback.err { color: #ef4444; }
.admin-feedback.ok { color: var(--green); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.admin-table th { background: #f7f7fc; text-align: left; padding: 11px 14px; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.admin-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.admin-table tr:last-child td { border-bottom: none; }
.hist-row { cursor: pointer; }
.hist-row:hover td { background: #fafafe; }
.row-actions { text-align: right; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; }
.badge.on { background: var(--green-light); color: #0f7a5a; }
.badge.off { background: #fef2f2; color: #dc2626; }
.toggle { position: relative; width: 38px; height: 22px; background: #d4d3e0; border-radius: 20px; cursor: pointer; transition: background 0.2s; border: none; }
.toggle.on { background: var(--green); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left 0.2s; }
.toggle.on::after { left: 18px; }
.hist-filters { display: flex; gap: 10px; margin-bottom: 16px; }
.hist-filters select { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 9px; font-family: inherit; font-size: 13px; background: #fff; cursor: pointer; outline: none; }
/* Chat panel overlay */
.chat-panel { position: fixed; inset: 0; background: rgba(30,27,46,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; }
.chat-panel-inner { background: var(--surface); border-radius: 16px; width: 720px; max-width: 92vw; max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 30px 80px rgba(0,0,0,0.3); }
.chat-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.chat-panel-body { overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.panel-msg-who { font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.panel-msg.user .panel-msg-body { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; display: inline-block; }
.panel-msg.assistant .panel-msg-body { background: #f7f7fc; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.admin-close { background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; line-height: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.8); display: none; align-items: center; justify-content: center; z-index: 300; cursor: zoom-out; padding: 30px; }
.lightbox img { max-width: 95%; max-height: 95%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

.messages { flex: 1; overflow-y: auto; padding: 28px 0; }
.messages-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; display: flex; flex-direction: column; gap: 24px; }
.msg-row { display: flex; gap: 12px; }
.msg-row.user { flex-direction: row-reverse; }
.msg-avatar { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.msg-avatar.ai { background: linear-gradient(135deg, var(--indigo), var(--violet)); color: white; }
.msg-avatar.user { background: var(--ink); color: white; }
.msg-col { display: flex; flex-direction: column; gap: 5px; max-width: 80%; }
.msg-row:not(.user) .msg-col { max-width: 560px; }
.msg-row.user .msg-col { align-items: flex-end; }
.msg-meta { font-size: 11px; color: var(--muted); padding: 0 2px; display: flex; gap: 8px; align-items: center; }
.msg-timer { color: var(--indigo); font-weight: 600; }
.price-timer { margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; }
.price-timer.done { color: var(--muted); }
.timing-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.timing-chip { font-size: 10.5px; font-weight: 500; padding: 3px 8px; border-radius: 6px; background: #f3f3fb; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.timing-chip.db { background: var(--green-light); color: #0f7a5a; }
.timing-chip.claude { background: var(--indigo-light); color: var(--indigo-dark); }
.timing-chip.total { background: var(--ink); color: #fff; }
/* Collapsed timing: total + ? toggle */
.timing-collapsed { display: flex; align-items: center; gap: 7px; }
.timing-toggle { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.timing-toggle:hover { border-color: var(--indigo); color: var(--indigo); }
.timing-toggle.open { background: var(--indigo-light); border-color: var(--indigo); color: var(--indigo-dark); }
.timing-detail { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
/* Client chip */
.client-chip { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #fbfaff, #f5f3ff); border: 1px solid #e7e3fb; border-radius: 13px; padding: 13px 16px; margin-bottom: 14px; }
.client-avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; position: relative; }
.client-avatar .verify { position: absolute; bottom: -2px; right: -2px; width: 16px; height: 16px; border-radius: 50%; background: var(--indigo); border: 2px solid #fff; display: flex; align-items: center; justify-content: center; }
.client-avatar .verify svg { width: 9px; height: 9px; color: #fff; }
/* Identity match confidence — amber when the sender was matched by domain/name,
   slate when there is no customer record at all. */
.client-avatar .verify.unverified { background: #d97706; }
.client-avatar .verify.newclient { background: #64748b; }
.client-chip.mc-domain, .client-chip.mc-name { background: linear-gradient(135deg, #fffdf7, #fff8ec); border-color: #f4dcae; }
.client-chip.mc-none { background: linear-gradient(135deg, #fbfcfd, #f4f6f8); border-color: #dfe4ea; }
.client-badge { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.client-badge.warn { background: #fef3c7; color: #92400e; border: 1px solid #f4dcae; }
.client-badge.new { background: #eef1f5; color: #475569; border: 1px solid #dfe4ea; }
.client-last-order { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--ink-soft); }
.client-last-order svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
.client-match-note { margin-top: 6px; font-size: 11.5px; line-height: 1.45; color: #92400e; }
.client-chip.mc-none .client-match-note { color: #475569; }
.client-main { flex: 1; min-width: 0; }.client-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.client-name { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.client-company { font-size: 12.5px; color: var(--muted); }
.client-contact { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.client-contact a, .client-contact span { font-size: 12px; color: var(--ink-soft); text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.client-contact a:hover { color: var(--indigo-dark); }
.client-contact svg { width: 12px; height: 12px; color: var(--muted); flex-shrink: 0; }
.client-stats { flex-shrink: 0; display: flex; gap: 8px; }
.client-stats .stat { text-align: center; padding: 6px 12px; border-radius: 10px; background: #fff; border: 1px solid #e7e3fb; }
.client-stats .num { font-size: 18px; font-weight: 700; color: var(--indigo-dark); line-height: 1; }
.client-stats .lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 3px; }
/* Stepped flow */
.flow { display: flex; flex-direction: column; }
.fstep { display: flex; gap: 14px; }
.frail { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.fdot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: #fff; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; transition: all 0.25s; }
.fline { width: 2px; flex: 1; background: var(--line); margin: 4px 0; min-height: 14px; transition: background 0.25s; }
.fstep:last-child .fline { display: none; }
.fstep.active .fdot { border-color: var(--indigo); color: var(--indigo); box-shadow: 0 0 0 4px var(--indigo-light); }
.fstep.done .fdot { border-color: var(--green); background: var(--green); color: #fff; }
.fstep.done .fline { background: var(--green); }
.fbody { flex: 1; padding-bottom: 16px; min-width: 0; }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ftitle { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.fstep:not(.active):not(.done) .ftitle { color: var(--muted); }
.ftime { font-size: 11px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; background: #f1f0f9; padding: 2px 8px; border-radius: 6px; }
.fstep.done .ftime { background: var(--green-light); color: #0f7a5a; }
.fcontent { margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--ink-soft); }
.fcontent.hidden { display: none; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid #c7cbff; border-top-color: var(--indigo); border-radius: 50%; animation: spin 0.6s linear infinite; vertical-align: middle; margin-right: 6px; }
.next-row { margin-top: 4px; }
.next-btn { font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 20px; background: var(--indigo); color: #fff; border: none; border-radius: 9px; cursor: pointer; }
.next-btn:hover { background: var(--indigo-dark); }
.next-btn:disabled { opacity: 0.4; cursor: default; }
/* Rotating step indicator */
.step-ind { display: flex; align-items: center; gap: 9px; background: var(--green-light); border: 1px solid #c7f0e0; border-radius: 10px; padding: 9px 13px; margin-bottom: 12px; font-size: 13px; color: #0f7a5a; font-weight: 500; }
.step-ind-label { transition: opacity 0.12s; }
.step-ind-count { margin-left: auto; font-size: 11px; font-weight: 600; color: #0d6e51; opacity: 0.7; }
/* Flow result block */
.flow-result .fr-chip { margin-bottom: 2px; }
.fr-summary { font-size: 13.5px; line-height: 1.5; color: var(--ink); margin: 4px 0 12px; }
.fr-tabs { display: flex; flex-direction: column; gap: 7px; }
.fr-tab { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fr-tab-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fbfbfe; border: none; padding: 9px 13px; cursor: pointer; font-family: inherit; font-size: 12.5px; color: var(--ink); }
.fr-tab-head:hover { background: var(--indigo-light); }
.fr-tab-head.open { background: var(--indigo-light); }
.fr-tab-title strong { color: var(--indigo-dark); }
.fr-tab-chev { color: var(--muted); font-size: 11px; }
.fr-tab-body { padding: 8px 13px 11px; border-top: 1px solid var(--line); }
.tab-line { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 12px; }
.tab-main { color: var(--ink); }
.tab-sub { color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.bubble { padding: 14px 18px; border-radius: 14px; font-size: 14.5px; line-height: 1.65; }
.bubble.user { background: var(--ink); color: white; border-bottom-right-radius: 4px; }
.bubble.ai { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink); }

/* Single rotating action strip */
.steps { display: none; align-items: center; gap: 9px; padding: 9px 13px; background: var(--green-light); border: 1px solid #c7f0e0; border-radius: 10px; margin-bottom: 10px; font-size: 13px; color: #0f7a5a; font-weight: 500; }
.steps.active { display: flex; }
.action-spin { width: 14px; height: 14px; border: 2px solid #a7e8d0; border-top-color: var(--green); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }
.steps.done .action-spin { display: none; }
.action-check { width: 15px; height: 15px; color: var(--green); flex-shrink: 0; display: none; }
.steps.done .action-check { display: block; }
.action-label { transition: opacity 0.15s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* Markdown content */
.bubble.ai h2 { font-size: 15px; font-weight: 600; margin: 14px 0 8px; color: var(--ink); }
.bubble.ai h2:first-child { margin-top: 0; }
.bubble.ai p { margin: 8px 0; }
.bubble.ai p:first-child { margin-top: 0; }
.bubble.ai p:last-child { margin-bottom: 0; }
.bubble.ai strong { font-weight: 600; color: var(--ink); }
.bubble.ai ul { padding-left: 18px; margin: 8px 0; }
.bubble.ai li { margin: 4px 0; }
.bubble.ai code { background: #f3f3fb; padding: 2px 6px; border-radius: 5px; font-size: 12.5px; font-family: 'SF Mono', Menlo, monospace; color: var(--indigo-dark); }
.bubble.ai hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }
.tbl-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
thead th { background: #f7f7fc; padding: 10px 14px; text-align: left; font-weight: 600; color: var(--ink-soft); border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafafe; }
tbody td:not(:first-child) { font-variant-numeric: tabular-nums; }

.typing-dots { display: flex; gap: 5px; padding: 4px 0; }
.typing-dots span { width: 7px; height: 7px; background: #c7c5d6; border-radius: 50%; animation: bob 1.2s infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bob { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Input */
.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 16px 0 20px; }
.composer-inner { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.agent-picker { margin-bottom: 16px; }
.agent-picker-label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 5px; }
.agent-title { font-size: 15px; font-weight: 700; color: var(--ink); padding: 0 4px; }
.agent-select { width: 100%; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; }
.agent-select:hover { border-color: var(--indigo); }
.agent-select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 7px 14px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; transition: all 0.15s; font-weight: 500; }
.chip:hover { background: var(--indigo-light); border-color: var(--indigo); color: var(--indigo-dark); }
.input-shell { display: flex; gap: 10px; align-items: flex-end; background: #fcfcff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; transition: all 0.15s; }
.input-shell:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); background: #fff; }
textarea { flex: 1; border: none; background: transparent; font-size: 14.5px; resize: none; height: 40px; max-height: 120px; font-family: inherit; outline: none; padding: 9px 0; line-height: 1.5; color: var(--ink); }
.send-btn { width: 40px; height: 40px; background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: white; border: none; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; flex-shrink: 0; }
.send-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(99,102,241,0.4); }
.send-btn:disabled { background: #d4d3e0; cursor: not-allowed; }
.send-btn svg { width: 18px; height: 18px; }
.attach-btn { width: 38px; height: 40px; background: transparent; border: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: color 0.15s; }
.attach-btn:hover { color: var(--indigo); }
.attach-btn svg { width: 19px; height: 19px; }
.pending-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pending-file { position: relative; width: 72px; }
.pending-file .pf-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 9px; border: 1px solid var(--line); display: block; background: #f3f3fb; }
.pending-file .pf-pdf { width: 72px; height: 72px; border-radius: 9px; border: 1px solid var(--line); background: linear-gradient(135deg,#fef2f2,#fee2e2); color: #dc2626; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pending-file .pf-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; background: var(--ink); color: #fff; border: none; border-radius: 50%; cursor: pointer; font-size: 12px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.pending-file .pf-name { font-size: 9px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending-file .pf-spin { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.7); border-radius: 9px; }
.pending-file .pf-spin div { width: 18px; height: 18px; border: 2px solid #c7cbff; border-top-color: var(--indigo); border-radius: 50%; animation: spin 0.6s linear infinite; }
.hint { text-align: center; font-size: 11px; color: var(--muted); margin-top: 10px; }

/* Calculator widget */
.calc { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-top: 6px; background: var(--surface); box-shadow: 0 4px 20px rgba(49,46,129,0.06); width: 520px; max-width: 100%; }
.calc-head { padding: 11px 18px; background: linear-gradient(135deg, var(--indigo), var(--violet)); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-title { font-size: 14px; font-weight: 600; opacity: 0.95; }
.calc-price { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-price small { font-size: 11px; font-weight: 500; opacity: 0.8; }
.calc-price small { font-size: 13px; font-weight: 500; opacity: 0.75; }
.calc-body { padding: 16px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.calc-field { display: flex; flex-direction: column; gap: 5px; }
.calc-field-hidden { opacity: 0.55; }
.calc-qty-row { display: flex; gap: 14px; align-items: flex-end; }
.calc-versions-ctrl { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.ver-stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; height: 38px; }
.ver-stepper button { width: 32px; height: 100%; border: none; background: #f5f3ff; color: var(--indigo-dark); font-size: 16px; font-weight: 700; cursor: pointer; }
.ver-stepper button:hover { background: var(--indigo-light); }
.ver-count { min-width: 34px; text-align: center; font-size: 14px; font-weight: 700; color: var(--ink); }
.calc-versions-panel { margin-top: 12px; background: #f7f7fb; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.ver-panel-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.ver-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ver-rowlabel { font-size: 13px; font-weight: 600; color: var(--ink); width: 80px; flex-shrink: 0; }
.ver-input { flex: 1; }
.ver-input label { display: block; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 3px; }
.ver-input input { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; }
.ver-input input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.ver-warn { font-size: 12px; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 11px; margin-top: 4px; }
.calc-field-inactive { opacity: 0.4; }
.calc-field-inactive .calc-select { pointer-events: none; background: #f5f5f8; }
.inactive-tag { font-size: 9px; font-weight: 600; text-transform: uppercase; color: var(--muted); background: #f1f0f9; border-radius: 4px; padding: 1px 5px; vertical-align: middle; }
.reason-row.field-inactive { opacity: 0.45; }
.reason-row.field-inactive .reason-select { background: #f5f5f8; }
.calc-field-hidden .calc-label { color: var(--muted); }
.hidden-eye { display: inline-flex; vertical-align: middle; color: var(--muted); }
.calc-field.full { grid-column: 1 / -1; }
.calc-label { font-size: 10.5px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.calc-custom-qty { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; font-family: inherit; background: #fcfcff; color: var(--ink); outline: none; transition: all 0.15s; }
.calc-custom-qty:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
/* Custom size entry — shown under the Size dropdown when "Custom" is selected */
.calc-custom-size { margin-top: 8px; padding: 10px 11px; border: 1.5px solid #e0dbf7; border-radius: 10px; background: #fbfaff; }
.cs-head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.cs-title { font-size: 10.5px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.cs-src { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; border-radius: 4px; padding: 1px 5px; }
.cs-src-client { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.cs-src-default { background: #eef1f5; color: #475569; border: 1px solid #dfe4ea; }
.cs-range { font-size: 10.5px; color: var(--muted); margin-left: auto; }
.cs-inputs { display: flex; align-items: center; gap: 8px; }
.cs-field { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 9px; padding: 0 9px; transition: all 0.15s; }
.cs-field:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.cs-field > span { font-size: 11px; font-weight: 700; color: var(--muted); flex: none; }
.cs-field input { flex: 1; min-width: 0; padding: 9px 0; border: none; background: transparent; font-size: 14px; font-family: inherit; color: var(--ink); outline: none; }
.cs-field em { font-size: 10.5px; font-style: normal; color: var(--muted); flex: none; }
.cs-x { font-size: 14px; color: var(--muted); flex: none; }
.cs-note { margin-top: 7px; font-size: 11.5px; line-height: 1.45; }
.cs-note.cs-need { color: #b45309; }
.cs-note.cs-warn { color: #92400e; }
.cs-note.cs-preset { color: var(--indigo-dark); }
.cs-use-preset { margin-left: 4px; border: 1px solid var(--indigo); background: #fff; color: var(--indigo-dark); font-size: 11px; font-weight: 600; font-family: inherit; padding: 2px 8px; border-radius: 6px; cursor: pointer; }
.cs-use-preset:hover { background: var(--indigo); color: #fff; }
.calc-note { font-size: 12px; margin-top: 8px; }
.calc-select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 13.5px; font-family: inherit; background: #fcfcff; color: var(--ink); cursor: pointer; outline: none; transition: all 0.15s; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b88a3' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.calc-select:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.calc-custom { display: flex; gap: 8px; margin-top: 6px; }
.calc-custom input { margin: 0; padding: 9px 11px; font-size: 13px; }
.calc-note { grid-column: 1/-1; font-size: 11.5px; color: var(--muted); }

/* Quote box */
.quote-box { position: relative; margin-top: 6px; background: #fbfbfe; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; width: 520px; max-width: 100%; box-sizing: border-box; }
.quote-text { font-family: 'Inter', sans-serif; font-size: 13.5px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; margin: 0; }
.quote-btn-row { display: flex; gap: 8px; margin-bottom: 12px; }
.quote-copy, .quote-email { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; font-family: inherit; padding: 6px 11px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 8px; cursor: pointer; transition: all 0.15s; }
.quote-copy:hover, .quote-email:hover { background: var(--indigo-light); border-color: var(--indigo); color: var(--indigo-dark); }
.quote-email { background: linear-gradient(135deg, var(--indigo), var(--indigo-dark)); color: #fff; border-color: transparent; }
.quote-email:hover { background: linear-gradient(135deg, var(--indigo-dark), var(--indigo-dark)); color: #fff; }
.quote-product-link { color: var(--indigo-dark); font-weight: 600; text-decoration: none; }
.quote-product-link:hover { text-decoration: underline; }
.prod-link { color: var(--indigo-dark); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--indigo-light); }
.prod-link:hover { border-bottom-color: var(--indigo); }
/* Clickable E-number inside any answer */
.enum-link { font-family: inherit; font-size: inherit; font-weight: 600; color: var(--indigo-dark); background: var(--indigo-light); border: 1px solid #ddd6fe; border-radius: 5px; padding: 0 5px; cursor: pointer; transition: all .12s; }
.enum-link:hover { background: var(--indigo); color: #fff; border-color: var(--indigo); }
/* E-number hover preview — body-level so the chat scroller can't clip it */
.jp-peek { position: fixed; z-index: 9999; width: 250px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 11px; box-shadow: 0 12px 36px rgba(30,20,70,.22); overflow: hidden; pointer-events: none; }
.jp-peek.jp-prepress { border-left-color: #d97706; }
.jp-peek.jp-ready { border-left-color: var(--indigo); }
.jp-peek.jp-production { border-left-color: #2563eb; }
.jp-peek.jp-done { border-left-color: #16a34a; }
.jp-peek img { width: 100%; height: 118px; object-fit: cover; display: block; background: #fafafd; }
.jp-body { padding: 9px 11px; }
.jp-prod { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.jp-name { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.jp-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.jp-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-top: 6px; display: inline-block; padding: 2px 7px; border-radius: 5px; background: #eef1f5; color: #475569; border: 1px solid #dfe4ea; }
.jp-prepress .jp-status { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.jp-ready .jp-status { background: var(--indigo-light); color: var(--indigo-dark); border-color: #ddd6fe; }
.jp-production .jp-status { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.jp-done .jp-status { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
/* One job, with live status */
.jb-card { margin: 10px 0 6px; padding: 13px 15px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 12px; background: #fff; max-width: 540px; }
.jb-card.jb-prepress { border-left-color: #d97706; }
.jb-card.jb-ready { border-left-color: var(--indigo); }
.jb-card.jb-production { border-left-color: #2563eb; }
.jb-card.jb-done { border-left-color: #16a34a; }
.jb-head { display: flex; align-items: flex-start; gap: 12px; }
.jb-thumb { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.jb-main { flex: 1; min-width: 0; }
.jb-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jb-e { font-size: 13px; font-weight: 700; color: var(--ink); }
.jb-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 7px; border-radius: 5px; background: #eef1f5; color: #475569; border: 1px solid #dfe4ea; }
.jb-prepress .jb-status { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.jb-ready .jb-status { background: var(--indigo-light); color: var(--indigo-dark); border-color: #ddd6fe; }
.jb-production .jb-status { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.jb-done .jb-status { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
/* A canceled job (estimate_stage 'complete' / substage 'canceled'). */
.jp-peek.jp-canceled, .jb-card.jb-canceled { border-left-color: #dc2626; }
.jp-canceled .jp-status, .jb-canceled .jb-status { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.jb-name { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-top: 3px; }
.jb-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.jb-total { margin-left: auto; font-size: 16px; font-weight: 700; color: var(--ink); }
.jb-tbl { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px; }
.jb-tbl td { padding: 4px 8px; border-top: 1px solid #eee; }
.jb-tbl td:first-child { color: var(--muted); width: 42%; }
.jb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.jb-sub { font-size: 11px; color: var(--muted); }
.jb-reorder { flex: none; border: 1px solid var(--indigo); background: #fff; color: var(--indigo-dark); font-family: inherit; font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.jb-reorder:hover { background: var(--indigo); color: #fff; }
/* Dictation button in the composer */
.mic-btn { flex: none; width: 34px; height: 34px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; color: var(--muted); display: flex; align-items: center; justify-content: center; padding: 0; transition: all .15s; align-self: flex-end; margin-bottom: 2px; }
.mic-btn svg { width: 16px; height: 16px; }
.mic-btn:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.mic-btn.rec { border-color: #ef4444; background: #fef2f2; color: #dc2626; animation: micPulse 1.4s ease-in-out infinite; }
@keyframes micPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,.45); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
/* Price from the calculator engine */
.pq-card { margin: 10px 0 6px; padding: 14px 16px; border: 1px solid #e0dbf7; border-radius: 13px; background: linear-gradient(160deg, #fbfaff, #f5f3ff); max-width: 520px; }
.pq-head { display: flex; align-items: flex-start; gap: 14px; }
.pq-prod { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.pq-qty { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pq-total { margin-left: auto; text-align: right; font-size: 22px; font-weight: 700; color: var(--indigo-dark); line-height: 1.1; }
.pq-total span { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.pq-was { display: block; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: line-through; line-height: 1.1; }
.pq-total { line-height: 1.15; }
.pq-sizewarn { margin-top: 9px; padding: 8px 11px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; line-height: 1.5; font-weight: 500; }
.pq-disc { display: flex; align-items: center; gap: 8px; margin-top: 9px; padding: 7px 11px; border-radius: 8px; background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; font-size: 12.5px; font-weight: 700; }
.pq-disc em { font-style: normal; font-weight: 500; font-size: 11px; opacity: .85; }
.pq-disc span { margin-left: auto; font-weight: 600; }
.jb-versions { margin-top: 9px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.jb-ver { display: flex; align-items: center; gap: 8px; padding: 5px 10px; font-size: 12px; color: var(--ink); border-top: 1px solid #f0f0f5; }
.jb-ver:first-child { border-top: none; }
.jb-ver > span { flex: 0 0 74px; color: var(--muted); font-size: 11px; font-weight: 600; }
.jb-ver em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--indigo-dark); }
.jb-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.jb-flag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; border-radius: 5px; padding: 2px 7px; }
.jb-disc { margin-top: 9px; padding: 6px 10px; border-radius: 7px; background: #dcfce7; border: 1px solid #bbf7d0; color: #166534; font-size: 11.5px; font-weight: 600; }
.pq-tbl { width: 100%; border-collapse: collapse; margin-top: 11px; font-size: 12.5px; }
.pq-tbl td { padding: 5px 8px; border-top: 1px solid #e9e6f7; }
.pq-tbl td:first-child { color: var(--muted); width: 40%; }
.pq-tbl td:last-child { color: var(--ink); font-weight: 500; }
.pq-vrow td:first-child { padding-left: 22px; font-size: 11.5px; }
.pq-vrow td { border-top-color: #f4f2fc; }
.pq-def { font-size: 10px; font-weight: 600; text-transform: uppercase; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.pq-spec-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.pq-link { font-size: 10px; font-weight: 600; text-transform: uppercase; background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.pq-note { font-size: 11px; color: var(--muted); margin-top: 10px; }
.pq-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
/* Two equal-width actions on their own row, so neither can be pushed off */
.pq-actions { display: flex; gap: 8px; margin-top: 10px; }
.pq-actions button { flex: 1 1 0; padding: 9px 12px; border-radius: 9px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.pq-copybtn { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.pq-copybtn:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.pq-copybtn.ok { border-color: #bbf7d0; background: #dcfce7; color: #166534; }
.pq-editbtn { border: 1px solid var(--indigo); background: #fff; color: var(--indigo-dark); }
.pq-editbtn:hover { background: var(--indigo); color: #fff; }
.pq-orderbtn { border: 1px solid var(--indigo); background: var(--indigo); color: #fff; }
.pq-orderbtn:hover { background: var(--indigo-dark); }
.pq-order { margin-top: 12px; padding: 12px; border: 1px solid #ddd6fe; border-radius: 10px; background: #fbfaff; }
.pq-order-hd { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.pq-order-hd em { font-style: normal; font-weight: 500; color: var(--muted); font-size: 11.5px; }
.pq-order textarea { flex: 1; min-width: 0; padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 12.5px; resize: vertical; outline: none; }
.pq-order textarea:focus { border-color: var(--indigo); }
.pq-fnote { font-size: 11px; color: var(--muted); margin: -4px 0 6px 127px; line-height: 1.45; }
.pq-fnote.pq-warn-note { color: #92400e; margin-left: 0; }
.pq-order-foot { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.pq-order-msg { flex: 1; font-size: 11.5px; color: #b45309; }
.pq-order-cancel { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-family: inherit; font-size: 12px; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.pq-order-send { border: none; background: var(--indigo); color: #fff; font-family: inherit; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.pq-order-send:disabled { opacity: .5; cursor: default; }
.pq-order-ok { font-size: 12.5px; font-weight: 600; color: #166534; background: #dcfce7; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 12px; }
.pq-order-ok.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.pq-order-sub { font-size: 11.5px; font-weight: 500; margin-top: 6px; opacity: .9; }
.pq-raw { display: block; margin-top: 6px; font-size: 10.5px; background: rgba(0,0,0,.05); padding: 6px 8px; border-radius: 6px; word-break: break-all; white-space: pre-wrap; }
.pq-order-warnbox { margin-top: 8px; padding: 9px 11px; border-radius: 8px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; line-height: 1.5; font-weight: 500; }
.pq-order-warn { font-weight: 500; color: #92400e; font-size: 11.5px; }
.pq-edit { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.pq-f { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-soft); }
.pq-f > span { flex: 0 0 118px; }
.pq-f select, .pq-f input { flex: 1; min-width: 0; padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 12.5px; background: #fff; color: var(--ink); outline: none; }
.pq-f select:focus, .pq-f input:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.pq-f option:disabled { color: #bbb; }
.pq-hint { flex: none; font-size: 11px; color: var(--muted); }
.pq-f-sub { margin-top: -3px; padding-left: 12px; border-left: 2px solid var(--indigo-light); }
.pq-f-sub > span { flex: 0 0 106px; font-size: 11.5px; color: var(--muted); }
.pq-x { flex: none; color: var(--muted); font-size: 12px; }
.pq-client-bar { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 11px; border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 9px; }
.pq-client-av { width: 30px; height: 30px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--indigo), #8f7ee0); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; }
.pq-client-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pq-client-info strong { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-client-info small { font-size: 11px; color: #166534; }
.pq-client-change { flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink-soft); font-family: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.pq-client-change:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.pq-client { border: 1px solid #fde68a; background: #fffbeb; border-radius: 9px; padding: 10px 11px; margin-bottom: 10px; }
.pq-client-hd { font-size: 12px; font-weight: 700; color: #92400e; margin-bottom: 7px; }
.pq-client-q { width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; outline: none; box-sizing: border-box; }
.pq-client-q:focus { border-color: var(--indigo); }
.pq-client-res { margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.pq-client-pick { display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-family: inherit; font-size: 12.5px; cursor: pointer; }
.pq-client-pick:hover { border-color: var(--indigo); background: #f8f7ff; }
.pq-client-pick span { flex: 1; min-width: 0; }
.pq-client-pick em { font-style: normal; color: var(--muted); }
.pq-client-pick small { color: var(--muted); font-size: 11px; }
.pq-client-n { flex: none; font-weight: 700; color: var(--indigo-dark); }
.pq-client-empty { font-size: 11.5px; color: var(--muted); padding: 4px 2px; }
.pq-vhelp { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); font-family: inherit; font-size: 10px; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; vertical-align: middle; margin-left: 4px; }
.pq-vhelp:hover { border-color: var(--indigo); color: var(--indigo-dark); background: var(--indigo-light); }
.pq-vtip { position: fixed; z-index: 9999; width: 240px; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 36px rgba(30,20,70,.22); padding: 10px 12px; }
.pq-vtip-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 6px; }
.pq-vtip-r { display: flex; align-items: baseline; gap: 7px; font-size: 12px; padding: 2px 0; }
.pq-vtip-r > span { flex: 0 0 66px; color: var(--muted); font-size: 11px; }
.pq-vtip-r > strong { flex: 0 0 42px; text-align: right; color: var(--indigo-dark); }
.pq-vtip-r > em { flex: 1; min-width: 0; font-style: normal; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pq-vtip-ft { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; color: var(--ink); text-align: right; }
.pq-vers { margin: 4px 0 6px; padding: 10px 11px; border: 1px solid #e0dbf7; border-radius: 10px; background: #fbfaff; max-height: 340px; overflow-y: auto; }
.pq-vers-hd { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); margin-bottom: 8px; }
.pq-vers-auto { border: 1px solid var(--indigo); background: #fff; color: var(--indigo-dark); font-family: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 6px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.pq-vers-auto:hover { background: var(--indigo); color: #fff; }
.pq-ver { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 8px; }
.pq-ver > span { flex: 0 0 74px; font-size: 12px; color: var(--muted); padding-bottom: 8px; }
.pq-vf { display: flex; flex-direction: column; gap: 2px; }
.pq-vf em { font-style: normal; font-size: 10px; color: var(--muted); }
.pq-vf-name { flex: 1; min-width: 0; }
.pq-vq { width: 76px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 12.5px; outline: none; }
.pq-vn { width: 100%; padding: 6px 9px; border: 1.5px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 12.5px; outline: none; box-sizing: border-box; }
.pq-vdel { flex: none; width: 28px; height: 30px; border: 1px solid var(--line); background: #fff; border-radius: 7px; color: #ef4444; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pq-vdel svg { width: 14px; height: 14px; }
.pq-vdel:hover { border-color: #ef4444; background: #fef2f2; }
.pq-vq:focus, .pq-vn:focus { border-color: var(--indigo); }
.pq-vers-note { font-size: 11px; margin-top: 2px; }
.pq-vers-note.ok { color: #166534; }
.pq-vers-note.bad { color: #b45309; font-weight: 600; }
.pq-edit-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.pq-status { font-size: 11.5px; color: var(--muted); }
.pq-done { border: none; background: var(--indigo); color: #fff; font-family: inherit; font-size: 12px; font-weight: 600; padding: 7px 15px; border-radius: 8px; cursor: pointer; }
.pq-done:hover { background: var(--indigo-dark); }
/* Identified client */
.cl-card { display: flex; align-items: center; gap: 12px; margin: 10px 0 6px; padding: 12px 14px; border: 1px solid #e0dbf7; border-radius: 12px; background: linear-gradient(135deg, #fbfaff, #f5f3ff); max-width: 480px; }
.cl-av { width: 40px; height: 40px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--indigo), #8f7ee0); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.cl-body { min-width: 0; flex: 1; }
.cl-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.cl-co { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.cl-contact { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.cl-stats { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
/* Client picker, most active first */
.cl-picks { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; max-width: 480px; }
.cl-picks-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cl-pick { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; cursor: pointer; transition: all .15s; }
.cl-pick:hover:not(:disabled) { border-color: var(--indigo); background: #f8f7ff; }
.cl-pick:disabled { opacity: .5; cursor: default; }
.cl-pick.chosen { border-color: var(--indigo); background: var(--indigo-light); opacity: 1; }
.cl-pick-av { width: 30px; height: 30px; border-radius: 50%; flex: none; background: #ede9fe; color: #4c1d95; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.cl-pick-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cl-pick-name { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.cl-pick-mail { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-pick-orders { flex: none; text-align: center; font-size: 15px; font-weight: 700; color: var(--indigo-dark); line-height: 1.1; }
.cl-pick-orders em { display: block; font-style: normal; font-size: 9.5px; font-weight: 600; text-transform: uppercase; color: var(--muted); }
/* Product chips with thumbnail — shown whenever a product is discussed */
/* One product per line. Wrapping let two cards share a row whenever the names
   were short, so the list read as a ragged grid instead of a list. */
.pc-row { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; align-items: stretch; }
.pc-card { display: flex; align-items: center; gap: 9px; padding: 6px 11px 6px 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; text-decoration: none; color: var(--ink); transition: all .15s; width: 100%; box-sizing: border-box; font-family: inherit; text-align: left; cursor: pointer; }
.pc-card.pc-busy { opacity: .55; pointer-events: none; }
.pc-open { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--indigo-dark); background: var(--indigo-light); border: 1px solid #ddd6fe; border-radius: 5px; padding: 2px 7px; }
.pc-card:hover .pc-open { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.pc-web { align-self: center; font-size: 13px; color: var(--muted); text-decoration: none; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--line); background: #fff; }
.pc-web:hover { color: var(--indigo-dark); border-color: var(--indigo); }
.calc-loading { font-size: 13px; color: var(--muted); padding: 4px 0; }
.pc-card:hover { border-color: var(--indigo); box-shadow: 0 3px 12px rgba(95,81,199,.15); }
.pc-thumb { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex: none; border: 1px solid var(--line); background: #f4f4f9; display: block; }
.pc-ph, .pc-noimg .pc-meta::before { }
.pc-ph { display: flex; align-items: center; justify-content: center; }
.pc-ph::after { content: "▤"; font-size: 20px; color: #c3c0d4; }
.pc-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
/* Full width per row means names fit — "Envelopes Prema…" can just say
   "Envelopes Premade". Still clipped if truly enormous. */
.pc-name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-open { margin-left: auto; }
.pc-id { font-size: 11px; color: var(--muted); }
/* Hover preview — body-level so the chat scroller can't clip it */
.pc-preview { position: fixed; z-index: 9999; width: 240px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 40px rgba(30,20,70,.22); pointer-events: none; }
.pc-preview img { width: 100%; height: 220px; object-fit: contain; border-radius: 8px; background: #fafafd; display: block; }
.pc-preview span { display: block; font-size: 12px; font-weight: 600; color: var(--ink); margin-top: 7px; text-align: center; }
/* Production turnaround timeline */
.ta-card { margin: 12px 0 6px; padding: 16px; border: 1px solid #e0dbf7; border-radius: 14px; background: linear-gradient(160deg, #fbfaff, #f6f4ff); max-width: 620px; }

.ta-cut { margin-top: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.55; padding: 8px 11px; background: #fff; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 12px; }
.ta-cut strong { color: var(--ink); }
.ta-strip { display: flex; gap: 6px; flex-wrap: wrap; }
.ta-day { flex: 0 0 62px; border-radius: 10px; padding: 8px 4px; text-align: center; border: 1.5px solid var(--line); background: #fff; }
.ta-dow { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ta-num { font-size: 18px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.ta-lbl { font-size: 9.5px; color: var(--muted); margin-top: 1px; line-height: 1.25; }
.ta-day.ta-approved { border-color: #c7c2f0; background: #f3f1fe; }
.ta-day.ta-approved .ta-num { color: var(--indigo-dark); }
.ta-day.ta-start { border-color: #c7c2f0; background: #f3f1fe; border-style: dashed; }
.ta-day.ta-start .ta-num { color: var(--indigo-dark); }
.ta-day.ta-production { border-color: #d9d4f5; }
.ta-day.ta-skipped { border-style: dashed; background: #f7f7fa; opacity: .72; }
.ta-day.ta-skipped .ta-num { color: var(--muted); font-weight: 600; }
.ta-day.ta-ready { border-color: var(--indigo); background: linear-gradient(160deg, var(--indigo), #8f7ee0); box-shadow: 0 4px 14px rgba(95,81,199,.28); }
.ta-day.ta-ready .ta-dow, .ta-day.ta-ready .ta-lbl { color: rgba(255,255,255,.85); }
.ta-day.ta-ready .ta-num { color: #fff; }
.ta-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; }
.ta-verdict { margin-top: 11px; padding: 8px 12px; border-radius: 9px; font-size: 12.5px; font-weight: 600; }
.ta-verdict.ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.ta-verdict.bad { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.op-q { font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
.op-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.op-choice { padding: 8px 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .15s; }
.op-choice:hover:not(:disabled) { border-color: var(--indigo); color: var(--indigo-dark); background: #f8f7ff; }
.op-choice:disabled { opacity: .45; cursor: default; }
.op-choice.chosen { border-color: var(--indigo); background: var(--indigo-light); color: var(--indigo-dark); opacity: 1; }
/* Selectable options for one field, shown visually */
.op-wrap { margin: 10px 0 6px; max-width: 520px; }
.op-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 7px; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.op-grid.op-plain { grid-template-columns: 1fr; }
.op-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; cursor: pointer; text-align: left; transition: all .15s; }
.op-plain .op-card { flex-direction: row; align-items: center; padding: 9px 12px; }
.op-card:hover:not(:disabled) { border-color: var(--indigo); background: #f8f7ff; box-shadow: 0 3px 12px rgba(95,81,199,.13); }
.op-card:disabled { opacity: .45; cursor: default; }
.op-card.chosen { border-color: var(--indigo); background: var(--indigo-light); opacity: 1; }
.op-img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 7px; overflow: hidden; background: #f4f4f9; border: 1px solid var(--line); }
.op-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-img.op-noimg { display: flex; align-items: center; justify-content: center; }
.op-img.op-noimg::after { content: "▤"; font-size: 20px; color: #c3c0d4; }
.op-name { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.op-name em { font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; background: #eef1f5; color: #64748b; border: 1px solid #dfe4ea; border-radius: 4px; padding: 1px 5px; margin-left: 3px; }
/* Clickable product choices in ChatBot answers */
.cb-picks { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 4px; max-width: 480px; }
.cb-picks-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cb-pick { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-family: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; transition: all .15s; }
.cb-pick:hover:not(:disabled) { border-color: var(--indigo); background: #f8f7ff; }
.cb-pick:disabled { opacity: .5; cursor: default; }
.cb-pick.chosen { border-color: var(--indigo); background: var(--indigo-light); opacity: 1; font-weight: 600; }
.cb-pick-extra { display: none; }
.cb-pick-body { flex: 1; min-width: 0; }
.cb-pick-img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.cb-pick-why { display: block; font-size: 11px; color: var(--indigo-dark); font-weight: 500; margin-top: 1px; }
.cb-pick-id { color: var(--muted); font-size: 12px; margin-left: 3px; font-weight: 400; }
.cb-pick-img.cb-pick-noimg { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#f4f4f9,#eceaf6); }
.cb-pick-img.cb-pick-noimg::after { content: "▤"; font-size: 15px; color: #c3c0d4; }
.cb-pick-go.info { color: #0f766e; background: #e3f6f4; border-color: #99e0d8; }
.cb-pick:hover:not(:disabled) .cb-pick-go.info { background: #0d9488; color: #fff; border-color: #0d9488; }
.cb-pick-go { flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--indigo-dark); background: var(--indigo-light); border: 1px solid #ddd6fe; border-radius: 5px; padding: 3px 8px; margin-left: 8px; }
.cb-pick:hover:not(:disabled) .cb-pick-go { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.cb-pick-pct { flex: none; font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px; white-space: nowrap; line-height: 16px; }
.cb-pick-pct.hi { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.cb-pick-pct.mid { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.cb-pick-pct.lo { background: #eef1f5; color: #64748b; border: 1px solid #dfe4ea; }
.cb-more { width: 100%; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.cb-more:hover { border-color: var(--indigo); color: var(--indigo-dark); border-style: solid; background: #f8f7ff; }
/* Product photos rendered inline in ChatBot answers */
.cb-img-link { display: inline-block; margin: 8px 0; line-height: 0; }
.cb-img { max-width: 260px; max-height: 260px; width: auto; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fafafd; display: block; transition: border-color .15s, box-shadow .15s; }
.cb-img-link:hover .cb-img { border-color: var(--indigo); box-shadow: 0 3px 14px rgba(95,81,199,.18); }
.prod-options { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; width: 520px; max-width: 100%; }
.prod-options-intro { font-size: 14px; color: var(--ink); margin-bottom: 4px; line-height: 1.5; }
.prod-option-btn { display: flex; align-items: stretch; gap: 0; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.15s, background 0.15s, box-shadow 0.15s; }
.prod-option-btn:hover { border-color: var(--indigo); background: var(--indigo-light); }
.prod-option-btn.chosen { border-color: var(--indigo); border-width: 2px; background: var(--indigo-light); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.prod-option-main { flex: 1; text-align: left; background: transparent; border: none; padding: 11px 14px; cursor: pointer; font-family: inherit; display: flex; flex-direction: row; align-items: center; gap: 11px; min-width: 0; }
.prod-option-body { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
/* Product thumbnail from product.image (448 of 582 products have one) */
.prod-thumb { width: 46px; height: 46px; flex: none; border-radius: 8px; overflow: hidden; background: #f2f2f7; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-thumb.no-img { background: linear-gradient(135deg, #f4f4f9, #eceaf6); position: relative; }
.prod-thumb.no-img::after { content: "▤"; font-size: 17px; color: #c3c0d4; }
/* Match strength badge */
.prod-match { flex: none; align-self: center; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; letter-spacing: .01em; }
.prod-match.mm-high { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.prod-match.mm-mid { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.prod-match.mm-low { background: #eef1f5; color: #64748b; border: 1px solid #dfe4ea; }
.prod-option-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 1px; }
/* Products past the first few stay hidden until "Show more" is clicked */
.prod-hidden-extra { display: none !important; }
.prod-show-more { width: 100%; margin-top: 2px; padding: 9px 12px; border: 1.5px dashed var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.prod-show-more:hover { border-color: var(--indigo); color: var(--indigo-dark); background: var(--indigo-light); border-style: solid; }
.prod-option-why { font-size: 11px; color: var(--muted); }
/* Order history — the strongest match signal, so it gets its own chip */
.prod-ord-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; letter-spacing: .01em; padding: 2px 8px; border-radius: 20px; background: #ede9fe; color: #4c1d95; border: 1px solid #ddd6fe; white-space: nowrap; }
.prod-ord-chip svg { width: 11px; height: 11px; flex: none; }
.prod-option-btn:hover .prod-ord-chip { background: #fff; border-color: #c4b5fd; }
.prod-option-main:disabled { cursor: default; }
.prod-option-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.prod-option-id { font-size: 11px; font-weight: 500; color: var(--muted); }
.client-star { font-size: 10px; font-weight: 600; color: #b45309; background: #fef3c7; border: 1px solid #fde68a; border-radius: 5px; padding: 1px 6px; vertical-align: middle; }
.am-note { margin-top: 10px; font-size: 12.5px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 9px 12px; line-height: 1.5; }
.reason-panel { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fbfbfe; width: 520px; max-width: 100%; box-sizing: border-box; }
.reason-title { font-size: 13.5px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.reason-summary { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 12px; padding: 9px 12px; background: var(--indigo-light); border-radius: 8px; }
.reason-list { display: flex; flex-direction: column; gap: 2px; }
.reason-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
/* Custom size W x H, shown directly under the Size decision.
   Green = the client gave us the size. Yellow = we filled it, so verify. */
.reason-size { margin: 4px 0 10px; padding: 9px 11px; border-radius: 9px; border: 1.5px solid; }
.reason-size.rs-ok { background: #f0fdf4; border-color: #bbf7d0; }
.reason-size.rs-check { background: #fffbeb; border-color: #fde68a; }
.rs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; flex-wrap: wrap; }
.rs-title { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-soft); }
.rs-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 2px 7px; border-radius: 5px; }
.rs-badge-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.rs-badge-check { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.rs-range { font-size: 10.5px; color: var(--muted); margin-left: auto; }
.rs-inputs { display: flex; align-items: center; gap: 8px; max-width: 50%; }
.rs-field { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; background: #fff; border: 1.5px solid var(--line); border-radius: 8px; padding: 0 9px; height: 36px; transition: all .15s; }
.rs-field:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.rs-field > span { font-size: 11px; font-weight: 700; color: var(--muted); flex: none; line-height: 1; }
.rs-field input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: none; background: transparent; font-size: 14px; line-height: 1; font-family: inherit; color: var(--ink); outline: none; }
.rs-field input::-webkit-outer-spin-button, .rs-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rs-field em { font-size: 10.5px; font-style: normal; color: var(--muted); flex: none; line-height: 1; }
.rs-x { font-size: 13px; color: var(--muted); flex: none; }
.rs-warn { margin-top: 8px; font-size: 11.5px; line-height: 1.45; color: #92400e; font-weight: 500; }
.reason-field { font-size: 12.5px; color: var(--muted); width: 130px; flex-shrink: 0; }
.reason-val { font-size: 13px; font-weight: 600; color: var(--ink); flex: 1; }
.reason-src { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; padding: 2px 7px; border-radius: 5px; }
.src-client { background: #ecfdf5; color: #0f7a5a; }
.src-history { background: #eff6ff; color: #1d4ed8; }
.src-inferred { background: #fef3c7; color: #b45309; }
.src-default { background: #f1f0f9; color: var(--muted); }
.reason-why { font-size: 11.5px; color: var(--muted); padding: 0 0 4px 140px; margin-top: -2px; }
.reason-select { flex: 1; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; cursor: pointer; }
.reason-select:hover { border-color: var(--indigo); }
.reason-select option:disabled { color: #ccc; }
.src-edited { background: #ede9fe; color: #6d28d9; }
.email-draft-head { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 12px; margin-bottom: 7px; }
.email-preview { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; width: 520px; max-width: 100%; box-sizing: border-box; }
.reason-actions { margin-top: 14px; }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.mp-row { border: 1px solid var(--line); border-radius: 11px; overflow: visible; background: #fbfbfe; }
.mp-row-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.mp-status { font-size: 13px; flex-shrink: 0; }
.mp-status.mp-pending { color: var(--muted); }
.mp-status.mp-active { color: var(--indigo); }
.mp-status.mp-done { color: #0f9d58; font-weight: 700; }
.mp-status.mp-skip { color: #ef4444; }
.mp-name { font-size: 13.5px; font-weight: 600; color: var(--ink); text-transform: capitalize; }
.mp-specs { font-size: 12px; color: var(--muted); flex: 1; }
/* Several of the client's line items merged into one multi-version job */
.mp-merged { margin: 0 14px 12px; padding: 10px 12px; border-radius: 9px; background: #f5f3ff; border: 1px solid #e7e3fb; }
.mp-merged-head { font-size: 12px; font-weight: 600; color: var(--indigo-dark); margin-bottom: 6px; }
.mp-merged-warn { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; background: #fef3c7; color: #92400e; border: 1px solid #f4dcae; border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.mp-merged-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.mp-merged-list li { font-size: 11.5px; color: var(--ink-soft); padding-left: 12px; position: relative; }
.mp-merged-list li::before { content: "·"; position: absolute; left: 3px; color: var(--muted); }
.mp-merged-list li.amb { color: #92400e; }
.mp-merged-flag { font-size: 10px; margin-left: 6px; color: #b45309; font-style: italic; }
.mp-merged-note { font-size: 11.5px; line-height: 1.45; color: var(--muted); margin-top: 7px; }
.version-warn { margin-top: 10px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; background: #fffbeb; border: 1px solid #f4dcae; color: #92400e; }
.mp-resolve { flex-shrink: 0; font-family: inherit; font-size: 12.5px; font-weight: 600; color: #fff; background: var(--indigo); border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.mp-resolve:disabled { opacity: 0.5; cursor: default; }
.mp-work { padding: 0 14px; }
.mp-work:not(:empty) { padding: 4px 14px 14px; }
.mp-pick { display: block; width: 100%; text-align: left; font-family: inherit; font-size: 13px; margin: 4px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.mp-pick:hover { border-color: var(--indigo); background: var(--indigo-light); }
.prod-option-btn.chosen .prod-option-title { color: var(--indigo-dark); }
.prod-option-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.prod-option-see { flex-shrink: 0; font-size: 11.5px; font-weight: 500; color: var(--indigo-dark); text-decoration: none; padding: 0 16px; border-left: 1px solid var(--line); white-space: nowrap; display: flex; align-items: center; gap: 4px; transition: background 0.15s; }
.prod-option-btn:hover .prod-option-see { border-left-color: rgba(99,102,241,0.25); }
.prod-option-see:hover { background: rgba(99,102,241,0.1); }

/* Attachment thumbnails */
.attach-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.attach-card { width: 116px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--surface); transition: all 0.15s; text-decoration: none; }
.attach-card:hover { border-color: var(--indigo); box-shadow: 0 4px 14px rgba(99,102,241,0.18); transform: translateY(-1px); }
.attach-thumb { width: 100%; height: 84px; object-fit: cover; display: block; background: #f3f3fb; }
.attach-pdf { width: 100%; height: 84px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#fef2f2,#fee2e2); color: #dc2626; font-size: 26px; font-weight: 700; }
.attach-name { padding: 7px 9px; font-size: 10.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-top: 1px solid var(--line); }

/* ===================== LAUNCHER / HOMEPAGE ===================== */
.launcher { min-height: 100vh; background: radial-gradient(circle at 25% 15%, #4f46e5 0%, #312e81 45%, #1e1b4b 100%); display: flex; flex-direction: column; }
.launcher-top { padding: 22px 40px; display: flex; align-items: center; justify-content: space-between; }
.launcher-logo { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.launcher-logo span { background: linear-gradient(135deg, #a5b4fc, #c4b5fd); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.launcher-user { display: flex; align-items: center; gap: 12px; color: #dcdcf5; font-size: 14px; }
.launcher-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.16); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.launcher-btn-ghost { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); padding: 7px 14px; font-size: 13px; color: #fff; border-radius: 9px; cursor: pointer; font-family: inherit; font-weight: 500; text-decoration: none; transition: all 0.15s; }
.launcher-btn-ghost:hover { background: rgba(255,255,255,0.2); }
.launcher-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 40px 60px; }
.launcher-heading { text-align: center; margin-bottom: 38px; }
.launcher-heading h1 { color: #fff; font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.launcher-heading p { color: #c7c7ed; font-size: 15px; }
.agent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 920px; width: 100%; }
@media (max-width: 860px) { .agent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .agent-grid { grid-template-columns: 1fr; } }
.agent-card { background: rgba(255,255,255,0.97); border-radius: 18px; padding: 24px; cursor: pointer; transition: transform 0.18s, box-shadow 0.18s; border: 1.5px solid transparent; display: flex; flex-direction: column; min-height: 168px; position: relative; overflow: hidden; }
.agent-card.active:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(20,16,60,0.45); border-color: #a5b4fc; }
.agent-card.locked { opacity: 0.6; cursor: not-allowed; background: rgba(255,255,255,0.82); }
.agent-card-icon { width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, var(--indigo), var(--violet)); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 22px; }
.agent-card-name { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.agent-card-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.5; flex: 1; }
.agent-card-cta { margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--indigo-dark); display: flex; align-items: center; gap: 5px; }
.agent-card-badge { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; padding: 3px 8px; border-radius: 20px; }
.agent-card-badge.soon { background: #fef3c7; color: #92400e; }
.agent-card-badge.restricted { background: #ede9fe; color: #6d28d9; }
.launcher-auth { background: #fff; padding: 2.75rem; border-radius: 20px; width: 400px; box-shadow: 0 30px 80px rgba(49,46,129,0.45); }

/* Agent dropdown when placed in the topbar (agent pages) */
.topbar-left .agent-picker { margin-bottom: 0; }
.topbar-left .agent-select { width: auto; min-width: 150px; font-size: 14px; font-weight: 600; padding: 7px 30px 7px 12px; }

/* Inline phase timer (reasoning / fill phases in the pricing flow) */
.phase-timer { font-size: 11px; font-weight: 600; color: var(--indigo); font-variant-numeric: tabular-nums; background: var(--indigo-light); padding: 2px 8px; border-radius: 12px; white-space: nowrap; }
.phase-timer.done { color: var(--muted); background: var(--bg); border: 1px solid var(--line); }

/* Prepress template results card */
.tmpl-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: #fbfbfe; }
.tmpl-head { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }

/* Prepress template card extras */
.tmpl-noprev { width: 100%; height: 84px; display: flex; align-items: center; justify-content: center; background: #f3f3fb; color: var(--muted); font-size: 12px; font-weight: 500; }
.tmpl-mine { display: inline-block; font-size: 9.5px; font-weight: 600; color: var(--indigo-dark); background: var(--indigo-light); padding: 1px 5px; border-radius: 8px; vertical-align: middle; }
.tmpl-foot { margin-top: 10px; font-size: 12px; color: var(--muted); }
.tmpl-foot a { color: var(--indigo-dark); font-weight: 600; text-decoration: none; }
.tmpl-foot a:hover { text-decoration: underline; }

/* Prepress spec card (real product specs) */
.spec-card { margin-top: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 14px; background: #fbfbfe; }
.spec-head { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 10px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 18px; }
.spec-row { display: flex; flex-direction: column; gap: 2px; }
.spec-k { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.spec-v { font-size: 14px; font-weight: 600; color: var(--ink); }
.spec-empty { font-size: 13px; font-weight: 400; color: var(--muted); font-style: italic; }
.spec-folder { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.spec-folder .spec-k { display: block; margin-bottom: 3px; }
.spec-folder code { font-size: 12px; color: var(--ink-soft); background: var(--bg); padding: 3px 7px; border-radius: 6px; word-break: break-all; }

/* Product picker "Load more" button */
.prod-load-more { margin-top: 8px; width: 100%; padding: 9px; background: var(--bg); border: 1px dashed var(--line); border-radius: 10px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.15s; }
.prod-load-more:hover { border-color: var(--indigo); color: var(--indigo); background: var(--indigo-light); }

/* New-client flow */
.newclient-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #92400e; background: #fef3c7; border: 1px solid #fde68a; padding: 7px 12px; border-radius: 10px; }
.newclient-note { margin-top: 10px; font-size: 13px; color: var(--ink-soft); background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; line-height: 1.5; }
.welcome-panel { margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: var(--surface); }
.welcome-sub { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 8px; }
.welcome-answer { font-size: 14px; color: var(--ink); line-height: 1.6; }
.welcome-answer p { margin: 0 0 10px; }
.welcome-qs { display: flex; flex-direction: column; gap: 7px; }
.welcome-q { text-align: left; font-family: inherit; font-size: 13px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; cursor: pointer; transition: all 0.13s; position: relative; padding-left: 32px; }
.welcome-q::before { content: '○'; position: absolute; left: 12px; color: var(--muted); font-weight: 700; }
.welcome-q.included { border-color: var(--indigo); background: var(--indigo-light); color: var(--ink); }
.welcome-q.included::before { content: '✓'; color: var(--indigo-dark); }
.welcome-q:hover { border-color: var(--indigo); }

/* Pinned client bar — fixed above the scrolling conversation */
.client-bar { position: relative; flex: none; padding: 8px 20px; border-bottom: 1px solid var(--line); background: #fff; z-index: 20; }
.cbar-btn { display: inline-flex; align-items: center; gap: 9px; padding: 6px 12px; border: 1px solid var(--line); background: #fff; border-radius: 20px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all .15s; }
.cbar-btn:hover { border-color: var(--indigo); color: var(--indigo-dark); }

.cbar-dot { width: 7px; height: 7px; border-radius: 50%; background: #cbd0dd; flex: none; }
.client-bar.on .cbar-dot { background: var(--indigo); }
.cbar-chev { font-size: 9px; opacity: .6; }
.cbar-pop { position: absolute; top: 100%; left: 20px; margin-top: 4px; width: 340px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 12px 36px rgba(30,20,70,.18); padding: 10px; z-index: 50; }
.cbar-pop input { width: 100%; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 13px; outline: none; box-sizing: border-box; }
.cbar-pop input:focus { border-color: var(--indigo); }
.cbar-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; margin-top: 4px; border: 1px solid transparent; border-radius: 8px; background: #fff; font-family: inherit; font-size: 12.5px; cursor: pointer; }
.cbar-row:hover { border-color: var(--line); background: #f7f7fb; }
.cbar-who { flex: 1; min-width: 0; display: block; }
.cbar-name { font-weight: 600; color: var(--ink); }
.cbar-co { font-weight: 400; color: var(--indigo-dark); }
.cbar-mail { display: block; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 1px; }
.cbar-n { flex: none; margin-left: auto; font-weight: 600; font-size: 12px; color: var(--muted); }
.cbar-empty { font-size: 12px; color: var(--muted); padding: 8px 2px; }
.cbar-clear { width: 100%; margin-top: 8px; padding: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-family: inherit; font-size: 11.5px; border-radius: 7px; cursor: pointer; }
.cbar-clear:hover { border-color: #fecaca; color: #b91c1c; }

.pq-recalc { font-size: 13px; font-weight: 600; color: var(--indigo-dark); }
.pq-recalc::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border: 2px solid var(--indigo); border-top-color: transparent; border-radius: 50%; vertical-align: -1px; animation: micPulse 0s, spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.cl-picked { margin-top: 8px; padding: 8px 11px; border-radius: 8px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 12px; font-weight: 600; }

/* Compact production schedule on every quote */
.pq-sched { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.sch-row { display: flex; gap: 5px; flex-wrap: wrap; }
.sch-day { flex: none; min-width: 42px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px 5px; background: #fff; line-height: 1.15; }
.sch-day em { display: block; font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.sch-day b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.sch-day i { display: block; font-style: normal; font-size: 8.5px; color: var(--muted); }
.sch-day.approved { background: #f5f4fd; border-color: #ddd6fe; }
.sch-day.approved b, .sch-day.approved em { color: var(--indigo-dark); }
.sch-day.approved i { color: var(--indigo-dark); opacity: .8; }
.sch-day.ready { background: linear-gradient(135deg, #6d5fd4, #5f51c7); border-color: #5f51c7; }
.sch-day.ready em, .sch-day.ready b, .sch-day.ready i { color: #fff; }
.sch-note { margin-top: 7px; font-size: 11.5px; color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 7px; padding: 6px 10px; }
.sch-note b { font-weight: 700; }

/* Attachment chips above the composer (ChatBot page) */
.pending-bar { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 0 8px; }
.pending-bar .wg-thumb { position: relative; width: 46px; height: 46px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.pending-bar .wg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pending-bar .wg-thumb button, .pending-bar .wg-file button { position: absolute; top: 1px; right: 1px; width: 15px; height: 15px; border: none; border-radius: 50%; background: rgba(20,18,40,.72); color: #fff; font-size: 9px; line-height: 1; cursor: pointer; padding: 0; }
.pending-bar .wg-file { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 22px 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; max-width: 260px; }
.pending-bar .wg-file.err { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.pending-bar .wg-file-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-bar .wg-file-x { color: var(--muted); font-size: 11px; }

.pq-redirect { margin-top: 9px; padding: 8px 11px; border-radius: 8px; background: var(--indigo-light); border: 1px solid #ddd6fe; color: var(--indigo-dark); font-size: 12px; line-height: 1.5; font-weight: 500; }

/* Collapsed price card — one line per product for multi-item requests */


/* Cart — priced items parked beside the client */
.cart-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 6px 12px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; border-radius: 20px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.cart-pill:hover { border-color: #16a34a; }
.cart-pill svg { width: 13px; height: 13px; }
.cart-pill span { background: #16a34a; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.cart-pop { position: absolute; top: 100%; left: 240px; margin-top: 4px; width: 380px; max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(30,20,70,.18); padding: 12px; z-index: 45; }
.cart-hd { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 9px; display: flex; justify-content: space-between; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.cart-row img, .cart-ph { width: 38px; height: 38px; flex: none; border-radius: 7px; object-fit: cover; border: 1px solid var(--line); background: linear-gradient(135deg,#f4f4f9,#eceaf6); }
.cart-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cart-body b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-body small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-price { flex: none; font-size: 13px; font-weight: 700; color: var(--indigo-dark); }
.cart-rm { flex: none; width: 22px; height: 22px; border: 1px solid var(--line); background: #fff; border-radius: 6px; color: var(--muted); font-size: 10px; cursor: pointer; padding: 0; }
.cart-rm:hover { border-color: #fecaca; color: #b91c1c; background: #fef2f2; }
.cart-ft { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; margin-top: 4px; border-top: 2px solid var(--line); font-size: 15px; }
.cart-ft b { color: var(--indigo-dark); }
.cart-saved { font-size: 11.5px; color: #166534; font-weight: 600; }
.cart-clear { flex: none; margin-top: 0; padding: 7px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-family: inherit; font-size: 11.5px; border-radius: 8px; cursor: pointer; }
.cart-clear:hover { border-color: #fecaca; color: #b91c1c; }
.pq-cartbtn { flex: 1; padding: 8px 12px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.pq-cartbtn:hover:not(:disabled) { border-color: #16a34a; background: #dcfce7; }
.pq-cartbtn:disabled { opacity: .7; cursor: default; }
.pq-card.pq-incart { border-color: #bbf7d0; }

.cart-actions { display: flex; gap: 8px; margin-top: 12px; }
.cart-order { flex: 1; padding: 9px; border: none; background: var(--indigo); color: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700; border-radius: 8px; cursor: pointer; }
.cart-order:hover:not(:disabled) { background: var(--indigo-dark); }
.cart-order:disabled { opacity: .6; cursor: default; }
.cart-form { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.cf-hd { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cf-item { border: 1px solid var(--line); border-radius: 9px; padding: 10px; margin-bottom: 9px; }
.cf-title { font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.cf-item label { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.cf-item label > input, .cf-item label > select { flex: 1; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 7px; font-family: inherit; font-size: 12px; outline: none; }
.cf-item label > input:focus, .cf-item label > select:focus { border-color: var(--indigo); }
.cf-foot { display: flex; align-items: center; gap: 10px; }
.cf-foot span { flex: 1; font-size: 11.5px; color: #b45309; }
.cf-done { padding: 12px; border-radius: 9px; background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; font-size: 13px; font-weight: 600; text-align: center; }

.cf-turn { font-size: 10.5px; color: var(--muted); margin: -2px 0 8px 0; padding-left: 2px; }

.cl-same { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; border-radius: 4px; padding: 1px 5px; margin-left: 5px; }

/* Checkout with no client — point at the bar rather than blocking with a dialog */
.cf-needclient { padding: 10px 12px; border-radius: 9px; background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 12px; line-height: 1.5; font-weight: 500; }
.client-bar.needs-client .cbar-btn { border-color: #f59e0b; background: #fffbeb; color: #92400e; animation: needClient 1.1s ease-in-out 2; }
@keyframes needClient {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
  50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, .28); }
}

/* Connected client — indigo theme, name in charcoal, company in indigo */
.client-bar.on .cbar-btn { align-items: center; padding: 7px 14px; border-radius: 11px; text-align: left; border-color: #ddd6fe; background: #f7f6fe; }
.client-bar.on .cbar-btn:hover { border-color: var(--indigo); background: #f3f1fd; }
.cbar-label { display: inline-flex; flex-direction: column; gap: 1px; min-width: 0; }
.cbar-l1 { font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.35; white-space: nowrap; }
.cbar-l1 em { font-style: normal; font-weight: 500; color: var(--indigo-dark); }
.cbar-l2, .cbar-l3 { font-size: 10.5px; color: var(--muted); line-height: 1.4; white-space: nowrap; }
.client-bar.on .cbar-dot { margin-top: 1px; align-self: center; }
.client-bar.on .cbar-chev { align-self: center; color: var(--indigo-dark); }



/* Estimated due date under the buttons */
.pq-eta { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.pq-eta b { color: var(--ink); font-weight: 600; }
.pq-eta-note { font-size: 10.5px; color: var(--muted); font-style: italic; }
.pq-eta-q { width: 16px; height: 16px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #fff; border-radius: 50%; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1; padding: 0; cursor: help; font-family: inherit; }
.pq-eta-q:hover { border-color: var(--indigo); color: #fff; background: var(--indigo); }

/* Breakdown popover */
.sch-tip { position: absolute; z-index: 900; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 44px rgba(30,20,70,.2); padding: 14px; width: max-content; max-width: 440px; }
.sch-tip-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 9px; }
.sch-tip-ft { margin-top: 9px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.sch-tip .sch-row { display: flex; gap: 5px; flex-wrap: wrap; }
.sch-tip .sch-day { flex: none; min-width: 44px; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px 6px; background: #fff; line-height: 1.15; }
.sch-tip .sch-day em { display: block; font-style: normal; font-size: 8.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.sch-tip .sch-day b { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.sch-tip .sch-day i { display: block; font-style: normal; font-size: 8.5px; color: var(--muted); }
.sch-tip .sch-day.approved { background: var(--indigo-light); border-color: #ddd6fe; }
.sch-tip .sch-day.approved b, .sch-tip .sch-day.approved em, .sch-tip .sch-day.approved i { color: var(--indigo-dark); }
.sch-tip .sch-day.ready { background: linear-gradient(135deg, #6d5fd4, #5f51c7); border-color: #5f51c7; }
.sch-tip .sch-day.ready em, .sch-tip .sch-day.ready b, .sch-tip .sch-day.ready i { color: #fff; }
.sch-tip .sch-day.off { opacity: .45; }

/* Price-critical field still on a default — settle it here, not in chat */
.pq-clarify td { background: #fffdf5; border-top-color: #fde68a !important; border-bottom: 1px solid #fde68a; }
.pq-clarify td:first-child { color: #92400e !important; font-weight: 600; }
.pq-clarify-tag { display: inline-block; margin-left: 6px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: 4px; padding: 1px 5px; vertical-align: 1px; }
.pq-clarify-sel { width: 100%; max-width: 320px; padding: 5px 8px; border: 1.5px solid #fcd34d; border-radius: 7px; background: #fff; font-family: inherit; font-size: 12.5px; color: var(--ink); outline: none; cursor: pointer; }
.pq-clarify-sel:hover { border-color: #f59e0b; }
.pq-clarify-sel:focus { border-color: var(--indigo); }
.pq-clarify-sel:disabled { opacity: .6; cursor: wait; }
.pq-clarify-why { display: block; margin-top: 3px; font-size: 10.5px; color: #a16207; line-height: 1.4; }

/* "Popular" — a badge, deliberately not indigo so it reads apart from the
   factual reasons beside it. */
.cb-pop { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fff1e6; color: #b45309; border: 1px solid #fed7aa; border-radius: 4px; padding: 1px 6px; vertical-align: 1px; }

/* Start day — light green, so "counting begins the day after this" is obvious */
.sch-tip .sch-day.start { background: #f0fdf4; border-color: #bbf7d0; }
.sch-tip .sch-day.start em, .sch-tip .sch-day.start i { color: #166534; }
.sch-tip .sch-day.start b { color: #14532d; }

.cb-why-no { color: var(--muted); font-weight: 400; }

/* An answer that is only cards needs no bubble around it */
.bubble.bare { background: none; border: none; padding: 0; box-shadow: none; }

/* Product chip once it is answered or on its way to a price */
.pc-card.pc-chosen { border-color: #ddd6fe; background: #faf9ff; cursor: default; }
.pc-card.pc-chosen:hover { box-shadow: none; border-color: #ddd6fe; }
.pc-open.working { background: #fff; border-color: var(--line); color: var(--muted); }

/* Product chip and its website link on one line */
.pc-line { display: flex; align-items: center; gap: 6px; width: 100%; }
.pc-line .pc-card { flex: 1; min-width: 0; }
.pc-line .pc-web { flex: none; }

/* Answers that contain cards hold a steady width while they stream, instead of
   starting narrow around the first line of text and jumping when a card lands. */
.bubble.ai.has-cards { width: 100%; max-width: 560px; box-sizing: border-box; }

/* Cart re-pricing after a client is connected */
.cart-recalc { padding: 16px 12px; text-align: center; font-size: 12.5px; color: var(--indigo-dark); }
.cart-recalc::before { content: ""; display: inline-block; width: 11px; height: 11px; margin-right: 8px; border: 2px solid var(--indigo); border-top-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .7s linear infinite; }
.cart-pill.recalc { opacity: .6; pointer-events: none; }
.cart-pill.recalc span { animation: cartPulse 1s ease-in-out infinite; }
@keyframes cartPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ===== Two-pane layout: chat left, calculator right ===== */
.split { flex: 1; display: flex; min-height: 0; gap: 0; }
.split .messages { flex: 1; min-width: 0; }

.calc-pane { flex: 0 0 520px; display: flex; flex-direction: column; min-height: 0;
  border-left: 1px solid var(--line); background: #fbfbfe; }
.calc-pane-hd { flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 11px 16px; border-bottom: 1px solid var(--line);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: #fff; }
.calc-pane-x { border: 1px solid var(--line); background: #fff; border-radius: 6px;
  width: 22px; height: 22px; font-size: 10px; color: var(--muted); cursor: pointer; padding: 0; }
.calc-pane-x:hover { border-color: #fecaca; color: #b91c1c; }
.calc-pane-body { flex: 1; overflow-y: auto; padding: 14px; }
.calc-pane-empty { color: var(--muted); font-size: 12.5px; line-height: 1.6; padding: 22px 8px;
  text-align: center; }
/* The card fills the pane rather than sitting at its chat width */
.calc-pane .pq-card { max-width: none; width: 100%; margin: 0 0 12px; }

/* A quote that opened in the pane leaves a marker in the conversation */
.pq-moved { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 9px 12px;
  border: 1px dashed var(--line); border-radius: 9px; background: #fbfbfe;
  font-size: 12px; color: var(--muted); }
.pq-moved b { color: var(--ink); font-weight: 600; }
.pq-moved button { margin-left: auto; border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--indigo-dark);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.pq-moved button:hover { border-color: var(--indigo); }

/* Narrow screens: no room for two panes, so the card stays in the chat */
@media (max-width: 1200px) {
  .calc-pane { display: none; }
}

/* ===== Split layout, second pass =====
   The composer belongs to the chat column, so the calculator runs full height
   beside it instead of stopping short above a shared input bar. */
.split .chat-col { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.split .chat-col .messages { flex: 1; min-height: 0; }
.split .chat-col .composer { flex: none; }

/* Client and cart now head the calculator column. */
.calc-pane > .client-bar { flex: none; position: relative; padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: #fff; display: flex; align-items: center; gap: 8px; }
.calc-pane > .client-bar .cbar-btn { flex: 1; min-width: 0; }
.calc-pane > .client-bar .cbar-pop { left: 14px; right: 14px; width: auto; }
.calc-pane > .client-bar .cart-pop { left: 14px; right: 14px; width: auto; }

/* The cart is always on show, so an empty one has to read as empty. */
.cart-pill.empty { border-color: var(--line); background: #fff; color: var(--muted); }
.cart-pill.empty span { background: var(--line); color: var(--muted); }
.cart-pill.empty b { display: none; }

/* Quote markers in the conversation */
.pq-moved.on { border-style: solid; border-color: var(--indigo); background: #f7f6fe; }
.pq-moved-q { font-size: 11.5px; color: var(--muted); }
.pq-moved-p { font-size: 12.5px; font-weight: 700; color: var(--indigo-dark); }

/* Calculator / Draft toggle */
.pane-toggle { display: inline-flex; gap: 2px; margin-left: auto; margin-right: 8px;
  background: #f2f1f9; border-radius: 7px; padding: 2px; }
.pane-toggle button { border: none; background: none; font-family: inherit; font-size: 10.5px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
  padding: 3px 9px; border-radius: 5px; cursor: pointer; }
.pane-toggle button.on { background: #fff; color: var(--indigo-dark); box-shadow: 0 1px 3px rgba(30,20,70,.12); }

/* Draft: the quote as a client would receive it */
.draft { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 16px 18px; }
.draft-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.draft-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin: 14px 0 4px; }
.draft-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.draft-t td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.draft-t td:first-child { color: var(--muted); width: 45%; }
.draft-qty td:first-child { color: var(--ink); font-weight: 600; }
.draft-qty b { color: var(--indigo-dark); }
.dr-each { font-size: 11px; color: var(--muted); font-weight: 400; }
.draft-copy { width: 100%; margin-top: 12px; padding: 9px; border: 1px solid var(--line);
  background: #fff; font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--indigo-dark); border-radius: 9px; cursor: pointer; }
.draft-copy:hover { border-color: var(--indigo); background: #f8f7ff; }

/* An answer the person moved on from — kept, but visibly set aside */
.bubble.ai.superseded { opacity: .55; }
.bubble.ai.superseded::after { content: "Superseded — you asked for something else";
  display: block; margin-top: 8px; font-size: 11px; color: var(--muted); font-style: italic; }

/* Cart actions */
.cart-draft { width: 100%; margin-top: 7px; padding: 8px; border: 1px solid var(--line);
  background: #fff; font-family: inherit; font-size: 12px; font-weight: 600;
  color: var(--ink-soft); border-radius: 8px; cursor: pointer; }
.cart-draft:hover { border-color: var(--indigo); color: var(--indigo-dark); background: #f8f7ff; }

/* Checkout in the pane */
.co-loading, .co-none { padding: 18px 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
.co-who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  padding: 9px 12px; background: #f7f6fe; border: 1px solid #ddd6fe; border-radius: 9px; margin-bottom: 12px; }
.co-who b { color: var(--ink); }
.co-who button { margin-left: auto; border: 1px solid var(--line); background: #fff;
  font-family: inherit; font-size: 11px; font-weight: 600; color: var(--indigo-dark);
  border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.co-step { margin-bottom: 14px; }
.co-step-hd { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); margin-bottom: 6px; }
.co-step input, .co-step select, .co-step textarea { width: 100%; box-sizing: border-box;
  padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 13px; outline: none; margin-bottom: 6px; }
.co-step input:focus, .co-step select:focus, .co-step textarea:focus { border-color: var(--indigo); }
.co-hint { font-size: 11px; color: var(--muted); line-height: 1.45; }
.co-results { max-height: 260px; overflow-y: auto; }
.co-client { display: block; width: 100%; text-align: left; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; padding: 8px 10px; margin-bottom: 5px;
  font-family: inherit; cursor: pointer; }
.co-client:hover { border-color: var(--indigo); background: #f8f7ff; }
.co-client b { font-size: 13px; }
.co-client span { font-size: 12px; color: var(--indigo-dark); }
.co-client small { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.co-items { padding: 10px 12px; background: #f7f6fe; border-radius: 9px; font-size: 12.5px;
  color: var(--muted); margin-bottom: 10px; }
.co-items b { color: var(--indigo-dark); font-size: 14px; }
.co-msg { font-size: 12px; color: #b45309; min-height: 16px; margin-bottom: 6px; }
.co-submit { width: 100%; padding: 11px; border: none; background: var(--indigo); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.co-submit:hover:not(:disabled) { background: var(--indigo-dark); }
.co-submit:disabled { opacity: .6; cursor: default; }
.co-done { text-align: center; padding: 24px 12px; }
.co-done-tick { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: #dcfce7; color: #166534; font-size: 22px; line-height: 44px; }
.co-done-hd { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.co-enums { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 12px; }
.co-enums a { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; border-radius: 7px;
  padding: 5px 11px; font-size: 13px; font-weight: 700; text-decoration: none; }
.co-enums a:hover { border-color: #16a34a; }
.draft-mail { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; font-family: inherit; font-size: 13px; line-height: 1.6; resize: vertical; outline: none; }
.draft-mail:focus { border-color: var(--indigo); }

/* Order / draft, under the card in the pane */
.pane-actions { display: flex; flex-direction: column; gap: 7px; margin-top: 14px;
  padding-top: 14px; border-top: 1px solid var(--line); }
.pa-order { padding: 11px; border: none; background: var(--indigo); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 700; border-radius: 9px; cursor: pointer; }
.pa-order:hover { background: var(--indigo-dark); }
.pa-draft { padding: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.pa-draft:hover { border-color: var(--indigo); color: var(--indigo-dark); background: #f8f7ff; }

/* Folded pane */
/* Folding hides the contents, not the column — a pane that changes width
   reflows the chat beside it every time you glance at a quote. */
.calc-pane.folded .calc-pane-body { display: none; }
.calc-pane.folded { flex: 0 0 520px; }

/* Shelf of quoted items */
.shelf-bar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 9px 14px; border-bottom: 1px solid var(--line); background: #fff; }
.shelf-hd { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-right: 2px; }
.shelf-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #ddd6fe;
  background: #f7f6fe; color: var(--indigo-dark); border-radius: 14px; padding: 3px 8px 3px 10px;
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: default; }
.shelf-chip em { font-style: normal; background: var(--indigo); color: #fff; border-radius: 8px;
  padding: 0 5px; font-size: 10px; }
.shelf-chip i { font-style: normal; color: var(--muted); cursor: pointer; font-size: 10px; padding: 0 2px; }
.shelf-chip i:hover { color: #b91c1c; }

/* Save-and-next */
.pa-save { padding: 9px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534;
  font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.pa-save:hover { border-color: #16a34a; background: #dcfce7; }

/* Draft with thumbnails */
.draft-item + .draft-item { margin-top: 18px; }
.draft-gap { height: 18px; border-top: 1px solid var(--line); margin: 18px 0 0; }
.draft-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.draft-head img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); }
.draft-head .draft-title { margin-bottom: 0; }

/* Fold button */
.calc-fold { display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border: 1px solid var(--line); background: #fff; border-radius: 7px;
  color: var(--muted); cursor: pointer; padding: 0; }
.calc-fold svg { width: 14px; height: 14px; transition: transform .18s ease; }
.calc-fold:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.calc-pane.folded .calc-fold svg { transform: rotate(180deg); }

/* Saved items as accordion tabs */
.shelf-bar { flex: none; display: block; padding: 8px; border-bottom: 1px solid var(--line);
  background: #fbfbfe; max-height: 45vh; overflow-y: auto; }
.shelf-item { border: 1px solid var(--line); border-radius: 9px; background: #fff; margin-bottom: 6px; }
.shelf-item.open { border-color: #ddd6fe; }
.shelf-tab { display: flex; align-items: center; gap: 9px; width: 100%; border: none;
  background: none; padding: 8px 10px; font-family: inherit; cursor: pointer; text-align: left; }
.shelf-tab img, .shelf-ph { width: 28px; height: 28px; flex: none; border-radius: 6px; object-fit: cover;
  border: 1px solid var(--line); background: linear-gradient(135deg,#f4f4f9,#eceaf6); }
.shelf-name { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shelf-sum { flex: none; font-size: 11.5px; color: var(--muted); }
.shelf-caret { flex: none; color: var(--muted); font-size: 11px; }
.shelf-body { padding: 0 10px 10px 47px; }
.shelf-rows { width: 100%; border-collapse: collapse; font-size: 12px; }
.shelf-rows td { padding: 3px 0; color: var(--ink-soft); }
.shelf-rows td:last-child { text-align: right; font-weight: 600; color: var(--indigo-dark); }
.shelf-acts { display: flex; gap: 6px; margin-top: 8px; }
.shelf-acts button { border: 1px solid var(--line); background: #fff; font-family: inherit;
  font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.shelf-acts button:first-child:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.shelf-acts button:last-child:hover { border-color: #fecaca; color: #b91c1c; }

.sa-view { border-color: #ddd6fe !important; color: var(--indigo-dark) !important;
  background: #f7f6fe !important; }
.sa-view:hover { border-color: var(--indigo) !important; }
.shelf-rows tr { cursor: pointer; }
.shelf-rows tr:hover td { color: var(--indigo-dark); }

/* The item currently being priced, as the next tab in the run */
.live-tab { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px;
  padding: 8px 11px; border: 1px solid var(--indigo); border-radius: 9px;
  background: #f7f6fe; font-size: 12.5px; font-weight: 600; color: var(--indigo-dark); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--indigo); flex: none; }
.live-tab em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 500;
  color: var(--muted); }

/* Send to CRM as a quote — the no-client route */
.pa-quote { padding: 9px; border: 1px solid #fde68a; background: #fffbeb; color: #92400e;
  font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.pa-quote:hover:not(:disabled) { border-color: #f59e0b; background: #fef3c7; }
.pa-quote:disabled { opacity: .7; cursor: default; }
.pa-quote.done { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

/* Saved section header */
.shelf-head { display: flex; align-items: center; gap: 7px; padding: 7px 4px 9px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); cursor: pointer; user-select: none; }
.shelf-head em { font-style: normal; background: var(--indigo); color: #fff; border-radius: 9px;
  padding: 0 6px; font-size: 10px; }
.shelf-sent { text-transform: none; letter-spacing: 0; font-weight: 500; color: #166534; font-size: 10.5px; }
.shelf-fold { margin-left: auto; font-size: 11px; }
.shelf-head:hover { color: var(--indigo-dark); }
.shelf-all { width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #fde68a;
  background: #fffbeb; color: #92400e; font-family: inherit; font-size: 11.5px; font-weight: 600;
  border-radius: 8px; cursor: pointer; }
.shelf-all:hover:not(:disabled) { border-color: #f59e0b; background: #fef3c7; }
.shelf-all:disabled { opacity: .7; cursor: default; }
.sa-crm { border-color: #fde68a !important; background: #fffbeb !important; color: #92400e !important; }
.sa-crm:hover:not(:disabled) { border-color: #f59e0b !important; }
.sa-sent { font-size: 11px; font-weight: 700; color: #166534; padding: 3px 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; }

/* Two-up action row */
.pa-row { display: flex; gap: 7px; }
.pa-row .pa-save { flex: 0 0 38%; }
.pa-row .pa-draft { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.pa-row .pa-draft svg { width: 14px; height: 14px; flex: none; }

.nova-ver { color: var(--muted); opacity: .75; }
/* ==========================================================================
   Installation & delivery calculator card (install-calc.js)
   Tokens and components from the Handling Options prototype
   (docs/install-pricing-training.md §6), scoped under .ic-card so they cannot
   leak into the rest of the chat.
   ========================================================================== */
.ic-card {
  color-scheme: light;
  --ic-surface:#ffffff; --ic-surface-2:#f6f6fe;
  --ic-border:#e6e6f7; --ic-border-strong:#c9c9ee;
  --ic-text:#191934; --ic-muted:#56568a; --ic-faint:#7676a8;
  --ic-accent:#4f46e5; --ic-accent-ink:#3730a3; --ic-accent-soft:#eef2ff; --ic-accent-line:#c7d2fe;
  --ic-warn-bg:#fff8e8; --ic-warn-line:#f2c14e; --ic-warn-ink:#7a4d05;
  --ic-bad-bg:#fef2f2; --ic-bad-line:#f5a3a3; --ic-bad-ink:#9a1c1c;
  font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:15px; line-height:1.45; color:var(--ic-text);
  background:var(--ic-surface); border:1px solid var(--ic-border); border-radius:14px;
  padding:18px 18px; margin:10px 0 6px; display:flex; flex-direction:column; gap:14px;
  box-shadow:0 1px 2px rgba(79,70,229,.05); max-width:560px; box-sizing:border-box; text-align:left;
}
.ic-card *, .ic-card *::before, .ic-card *::after { box-sizing:border-box; }
.ic-head { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
.ic-head h2 { margin:0; font-size:17px; font-weight:700; letter-spacing:-0.01em; color:var(--ic-text); }
.ic-eyebrow { font-size:12px; font-weight:600; color:var(--ic-muted); text-transform:uppercase; letter-spacing:.06em; }
.ic-seg { display:inline-flex; border:1px solid var(--ic-border-strong); border-radius:8px; overflow:hidden; }
.ic-seg button { height:30px; padding:0 12px; border:none; background:var(--ic-surface); color:var(--ic-muted);
  font:600 12.5px 'DM Sans',system-ui,sans-serif; cursor:pointer; }
.ic-seg button + button { border-left:1px solid var(--ic-border-strong); }
.ic-seg button.on { background:var(--ic-accent); color:#fff; }

.ic-calc { display:flex; flex-direction:column; gap:12px; padding:14px; background:var(--ic-surface-2);
  border:1px solid var(--ic-border); border-radius:12px; }
.ic-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.ic-grid.three { grid-template-columns:1fr 1fr 1fr; }
.ic-span2 { grid-column:span 2; }
@media (max-width:520px) { .ic-grid, .ic-grid.three { grid-template-columns:1fr; } .ic-span2 { grid-column:auto; } }

.ic-f { display:flex; flex-direction:column; gap:5px; font-size:12.5px; font-weight:600; color:var(--ic-muted); min-width:0; }
.ic-f input, .ic-f select { height:40px; padding:0 10px; border:1px solid var(--ic-border-strong); border-radius:8px;
  background-color:var(--ic-surface); color:var(--ic-text); font:500 14px 'DM Sans',system-ui,sans-serif; width:100%;
  outline:none; box-shadow:none; }
.ic-f input:focus, .ic-f select:focus { border-color:var(--ic-accent); box-shadow:0 0 0 3px var(--ic-accent-soft); }
.ic-f select { appearance:none; -webkit-appearance:none; padding-right:34px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position:right 10px center; }
.ic-f input.ic-need { border-color:var(--ic-warn-line); background:var(--ic-warn-bg); }
.ic-money { display:flex; align-items:center; height:40px; border:1px solid var(--ic-border-strong); border-radius:8px;
  overflow:hidden; background:var(--ic-surface); }
.ic-money:focus-within { border-color:var(--ic-accent); box-shadow:0 0 0 3px var(--ic-accent-soft); }
.ic-money span { padding:0 4px 0 9px; color:var(--ic-muted); font-weight:600; font-size:13px; }
.ic-f .ic-money input { flex:1; min-width:0; height:100%; border:none; background:transparent; padding:0 8px 0 0; box-shadow:none; }
.ic-sub { font-size:12px; font-weight:600; color:var(--ic-muted); text-transform:uppercase; letter-spacing:.06em;
  display:flex; align-items:center; justify-content:space-between; gap:8px; }

/* pieces: two lines per piece so it fits a chat bubble */
.ic-pieces { display:flex; flex-direction:column; gap:8px; }
.ic-piece { background:var(--ic-surface); border:1px solid var(--ic-border); border-radius:10px; padding:10px;
  display:grid; grid-template-columns:1.2fr 1fr; gap:8px; }
.ic-piece-dims { grid-column:span 2; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)) 28px; gap:8px; align-items:end; }
.ic-piece .ic-f input, .ic-piece .ic-f select, .ic-piece .ic-money { height:36px; }
.ic-piece-meta { grid-column:span 2; font-size:12px; color:var(--ic-faint); display:flex; justify-content:space-between; }
.ic-piece-meta b { color:var(--ic-text); font-weight:700; }
.ic-x { width:28px; height:36px; border:1px solid var(--ic-border); background:var(--ic-surface); color:var(--ic-faint);
  border-radius:8px; cursor:pointer; font-size:16px; line-height:1; }
.ic-x:hover { color:var(--ic-bad-ink); border-color:var(--ic-bad-line); }
@media (max-width:520px) { .ic-piece { grid-template-columns:1fr; } .ic-piece-dims { grid-template-columns:repeat(3, minmax(0,1fr)); }
  .ic-piece-dims .ic-x { grid-column:3; justify-self:end; } .ic-piece-dims, .ic-piece-meta { grid-column:auto; } }

.ic-checks { display:flex; flex-wrap:wrap; gap:8px; }
.ic-check { display:inline-flex; align-items:center; gap:8px; height:36px; padding:0 12px; border:1px solid var(--ic-border-strong);
  border-radius:999px; background:var(--ic-surface); font-size:13px; font-weight:600; color:var(--ic-muted); cursor:pointer; user-select:none; }
.ic-check input { accent-color:var(--ic-accent); margin:0; width:auto; height:auto; flex:none; padding:0; }
.ic-check { white-space:nowrap; }
.ic-check.on { border-color:var(--ic-accent); background:var(--ic-accent-soft); color:var(--ic-accent-ink); }
.ic-check small { font-weight:500; color:inherit; opacity:.8; }

.ic-lines { display:flex; flex-direction:column; gap:9px; }
.ic-line { display:flex; justify-content:space-between; gap:12px; font-size:14px; color:var(--ic-muted); }
.ic-line b { color:var(--ic-text); font-weight:700; white-space:nowrap; }
.ic-total { display:flex; justify-content:space-between; align-items:baseline; padding-top:12px; border-top:1px solid var(--ic-border); }
.ic-total b { font-size:22px; font-weight:700; color:var(--ic-text); }
.ic-total .ic-prov { font-size:12px; font-weight:700; color:var(--ic-warn-ink); background:var(--ic-warn-bg);
  border:1px solid var(--ic-warn-line); border-radius:999px; padding:2px 10px; margin-left:8px; vertical-align:middle; }

.ic-btn { height:38px; padding:0 14px; border:1px solid var(--ic-border-strong); background:var(--ic-surface); color:var(--ic-text);
  border-radius:8px; font:600 13.5px 'DM Sans',system-ui,sans-serif; cursor:pointer; }
.ic-btn:hover { border-color:var(--ic-accent); color:var(--ic-accent-ink); }
.ic-btn.primary { border-color:var(--ic-accent); background:var(--ic-accent); color:#fff; }
.ic-btn.small { height:30px; padding:0 10px; font-size:12.5px; }
.ic-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.ic-chip { display:inline-flex; align-items:center; gap:7px; height:28px; padding:0 12px; border-radius:999px;
  font-size:12.5px; font-weight:700; border:1px solid transparent; white-space:nowrap; }
.ic-chip .ic-bullet { width:8px; height:8px; border-radius:50%; background:currentColor; }
.ic-tone-grey { background:#f1f1f7; color:#55556f; border-color:#dedeed; }
.ic-tone-amber { background:#fff6e5; color:#8a5a00; border-color:#f3d79b; }
.ic-tone-indigo { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; }
.ic-tone-purple { background:#f4ecfe; color:#6b21a8; border-color:#ddc6f7; }
.ic-tone-green { background:#e9f8f0; color:#146c43; border-color:#b6e6cd; }

.ic-note { display:flex; align-items:center; gap:12px; padding:10px 12px; background:var(--ic-surface-2);
  border:1px solid var(--ic-border); border-radius:10px; font-size:13px; color:var(--ic-muted); flex-wrap:wrap; }
.ic-note > span:first-child { flex:1; min-width:0; }
.ic-note.info { background:var(--ic-accent-soft); border-color:var(--ic-accent-line); color:var(--ic-accent-ink); }
.ic-note.warn { background:var(--ic-warn-bg); border-color:var(--ic-warn-line); color:var(--ic-warn-ink); }
.ic-note.bad { background:var(--ic-bad-bg); border-color:var(--ic-bad-line); color:var(--ic-bad-ink); font-weight:600; }

/* "?" tooltip — explanations live here, never inline. Opens BELOW. */
.ic-tip { position:relative; display:inline-flex; flex-shrink:0; }
.ic-qmark { width:20px; height:20px; border-radius:50%; border:1px solid var(--ic-accent); color:var(--ic-accent-ink);
  background:var(--ic-accent-soft); display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; cursor:help; }
.ic-tip .ic-bubble { position:absolute; top:calc(100% + 10px); right:-8px; width:290px; padding:12px 14px; background:#20204a;
  color:#f3f3ff; border-radius:10px; font-size:12.5px; font-weight:500; line-height:1.5; opacity:0; visibility:hidden;
  transition:opacity .12s; z-index:60; box-shadow:0 14px 30px rgba(25,25,52,.28); }
.ic-tip .ic-bubble::after { content:""; position:absolute; bottom:100%; right:12px; border:6px solid transparent; border-bottom-color:#20204a; }
.ic-tip:hover .ic-bubble, .ic-tip:focus-within .ic-bubble { opacity:1; visibility:visible; }
.ic-adv summary { cursor:pointer; font-size:12.5px; font-weight:600; color:var(--ic-accent-ink); list-style:none; }
.ic-adv summary::-webkit-details-marker { display:none; }
.ic-adv summary::before { content:'+ '; }
.ic-adv[open] summary::before { content:'− '; }
.ic-adv > .ic-grid { margin-top:10px; }
.bubble.ai.has-cards .ic-card { max-width:none; width:100%; }

/* ---- Installation calculator v2: summary, route, calendar, schedule, accordions ---- */
.ic-sum { display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding:12px 14px; border-radius:12px; background:var(--ic-accent-soft); border:1px solid var(--ic-accent-line); }
.ic-sum-l { font-size:12px; font-weight:600; color:var(--ic-accent-ink); text-transform:uppercase; letter-spacing:.06em; }
.ic-sum-v { font-size:24px; font-weight:700; color:var(--ic-text); line-height:1.2; }
.ic-prov { font-size:11.5px; font-weight:700; color:var(--ic-warn-ink); background:var(--ic-warn-bg);
  border:1px solid var(--ic-warn-line); border-radius:999px; padding:2px 9px; margin-left:6px; vertical-align:middle; }
.ic-grid.ic-where { grid-template-columns:2fr 1fr; }
@media (max-width:520px) { .ic-grid.ic-where { grid-template-columns:1fr; } }

.ic-route { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--ic-muted); min-height:18px; margin-top:-4px; }
.ic-route:empty { display:none; }
.ic-route svg { width:15px; height:15px; flex:none; color:var(--ic-accent); }
.ic-route > span:first-of-type { flex:1; min-width:0; }
.ic-route b { color:var(--ic-text); }
.ic-route i { font-style:normal; color:var(--ic-warn-ink); }
.ic-route.bad { color:var(--ic-warn-ink); }
.ic-src { flex:none; font-size:11px; color:var(--ic-faint); border:1px solid var(--ic-border); border-radius:999px; padding:1px 8px; background:var(--ic-surface); }
.ic-spin { width:12px; height:12px; flex:none; border:2px solid var(--ic-accent-line); border-top-color:var(--ic-accent);
  border-radius:50%; animation:icSpin .7s linear infinite; }
@keyframes icSpin { to { transform:rotate(360deg); } }

/* tones shared by the calendar, schedule pills and dots */
.ic-t-green  { --tone:#146c43; --tone-bg:#e9f8f0; --tone-line:#b6e6cd; }
.ic-t-amber  { --tone:#8a5a00; --tone-bg:#fff6e5; --tone-line:#f3d79b; }
.ic-t-purple { --tone:#6b21a8; --tone-bg:#f4ecfe; --tone-line:#ddc6f7; }
.ic-t-red    { --tone:#9a1c1c; --tone-bg:#fef2f2; --tone-line:#f5a3a3; }
.ic-dot { width:9px; height:9px; border-radius:50%; background:var(--tone, var(--ic-faint)); flex:none; display:inline-block; }

/* date field + calendar */
.ic-datewrap { position:relative; }
.ic-datebtn { width:100%; height:40px; display:flex; align-items:center; gap:8px; padding:0 10px; border:1px solid var(--ic-border-strong);
  border-radius:8px; background:var(--ic-surface); color:var(--ic-text); font:500 14px 'DM Sans',system-ui,sans-serif; cursor:pointer; text-align:left; }
.ic-datebtn.empty { color:var(--ic-faint); }
.ic-datebtn svg { width:16px; height:16px; margin-left:auto; color:var(--ic-accent); flex:none; }
.ic-datebtn:hover, .ic-datebtn:focus { border-color:var(--ic-accent); outline:none; }
.ic-cal { position:absolute; top:calc(100% + 6px); left:0; z-index:70; width:268px; padding:12px; background:var(--ic-surface);
  border:1px solid var(--ic-border-strong); border-radius:12px; box-shadow:0 14px 34px rgba(25,25,52,.18); }
.ic-cal-h { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.ic-cal-h b { font-size:14px; color:var(--ic-text); }
.ic-cal-h button { width:28px; height:28px; border:1px solid var(--ic-border); border-radius:7px; background:var(--ic-surface);
  color:var(--ic-accent-ink); font-size:16px; cursor:pointer; }
.ic-cal-h button:disabled { opacity:.35; cursor:default; }
.ic-cal-w, .ic-cal-g { display:grid; grid-template-columns:repeat(7, 1fr); gap:3px; }
.ic-cal-w span { text-align:center; font-size:11px; font-weight:700; color:var(--ic-faint); padding:2px 0; }
.ic-cal-w .sat { color:#6b21a8; } .ic-cal-w .sun { color:#9a1c1c; }
.ic-day { height:32px; border:1px solid transparent; border-radius:8px; background:none; font:600 13px 'DM Sans',system-ui,sans-serif;
  color:var(--ic-text); cursor:pointer; }
.ic-day:hover:not(:disabled) { border-color:var(--ic-accent-line); background:var(--ic-accent-soft); }
.ic-day.sat { background:#f8f2ff; color:#6b21a8; }
.ic-day.sun { background:#fff5f5; color:#9a1c1c; }
.ic-day.today { border-color:var(--ic-accent); }
.ic-day.sel { background:var(--ic-accent); color:#fff; border-color:var(--ic-accent); }
.ic-day.past { opacity:.3; cursor:default; }
.ic-cal-f { display:flex; align-items:center; gap:8px; margin-top:10px; padding-top:9px; border-top:1px solid var(--ic-border); flex-wrap:wrap; }
.ic-cal-f button { border:none; background:none; color:var(--ic-accent-ink); font:600 12.5px 'DM Sans',system-ui,sans-serif; cursor:pointer; padding:2px 4px; }
.ic-leg { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--ic-muted); }
.ic-leg i { width:8px; height:8px; border-radius:50%; background:var(--tone); display:inline-block; }

/* schedule pills */
.ic-sched { display:flex; flex-wrap:wrap; gap:6px; }
.ic-pill { display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 11px; border-radius:999px; cursor:pointer;
  border:1px solid var(--ic-border-strong); background:var(--ic-surface); color:var(--ic-muted); font:600 12.5px 'DM Sans',system-ui,sans-serif; }
.ic-pill small { font-weight:500; font-size:11px; opacity:.85; }
.ic-pill:hover:not(:disabled) { border-color:var(--tone-line); background:var(--tone-bg); color:var(--tone); }
.ic-pill.on { border-color:var(--tone); background:var(--tone-bg); color:var(--tone); box-shadow:0 0 0 2px var(--tone-bg); }
.ic-pill:disabled { opacity:.4; cursor:default; }
.ic-sched-h { width:100%; font-size:11.5px; color:var(--ic-faint); }

/* accordions: pieces, crew */
.ic-acc { border:1px solid var(--ic-border); border-radius:10px; background:var(--ic-surface); }
.ic-acc > summary { display:flex; align-items:center; gap:10px; padding:11px 12px; cursor:pointer; list-style:none; user-select:none; }
.ic-acc > summary::-webkit-details-marker { display:none; }
.ic-acc-t { font-size:12px; font-weight:700; color:var(--ic-muted); text-transform:uppercase; letter-spacing:.06em; flex:none; }
.ic-acc-m { flex:1; min-width:0; font-size:13px; color:var(--ic-text); font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ic-acc-v { flex:none; font-size:14px; font-weight:700; color:var(--ic-text); }
.ic-chev { width:16px; height:16px; flex:none; color:var(--ic-accent); transition:transform .15s; }
.ic-acc[open] .ic-chev { transform:rotate(180deg); }
.ic-acc-b { padding:0 12px 12px; display:flex; flex-direction:column; gap:10px; }
.ic-acc .ic-piece { background:var(--ic-surface-2); }
.ic-addp { align-self:flex-start; }
.ic-warnt { color:var(--ic-warn-ink); font-weight:600; }
.ic-crew-why { font-size:12px; color:var(--ic-faint); }
.ic-crew-why:empty { display:none; }

/* in the ChatBot side pane the card fills the column */
.calc-pane .ic-card { max-width:none; width:100%; margin:0 0 12px; }

/* chat line that points at the calculator in the pane */
.ic-moved { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:8px 0 2px; padding:10px 12px; border-radius:11px;
  border:1px solid #c7d2fe; background:#eef2ff; color:#3730a3; font-size:13.5px; }
.ic-moved .ic-moved-t { flex:1; min-width:0; }
.ic-moved b { font-size:15px; color:#1e1b4b; }
.ic-moved button { border:1px solid #a5b4fc; background:#fff; color:#3730a3; border-radius:8px; padding:5px 11px;
  font-family:inherit; font-size:12.5px; font-weight:600; cursor:pointer; }
.ic-moved button:hover { background:#e0e7ff; }
.ic-moved.opening .ic-moved-t::after { content:'…'; }
/* The page's global `input` rule adds a bottom margin and padding; none of it belongs in the card. */
.ic-card input, .ic-card select { margin:0; }
.ic-card .ic-f .ic-money input { padding:0 8px 0 0; line-height:normal; }
.ic-datebtn { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Accordion header: title and amount on one line, the one-line summary under it. */
.ic-acc > summary { flex-wrap:wrap; row-gap:3px; }
.ic-acc-t { flex:1; }
.ic-acc-m { order:3; flex-basis:100%; white-space:normal; overflow:visible; color:var(--ic-muted); font-size:13px; }
.ic-acc-m:empty { display:none; }

/* Starter suggestions under the ChatBot composer: short pills with an icon. */
.suggestions { gap: 8px; }
.suggestion { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px 0 10px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-soft);
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 2px rgba(30, 27, 46, .05); transition: border-color .15s, background .15s, color .15s; }
.suggestion svg { width: 15px; height: 15px; flex: none; color: var(--indigo); }
.suggestion:hover { border-color: #c7d2fe; background: var(--indigo-light); color: var(--indigo-dark); }
.suggestion:focus-visible { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.suggestion:first-child { border-color: #c7d2fe; background: var(--indigo-light); color: var(--indigo-dark); font-weight: 600; }

/* ==========================================================================
   Nova reports (nova-report.js) — compact card + full-screen view.
   Same tokens, font and components as the installation calculator.
   ========================================================================== */
.nr {
  color-scheme: light;
  --ic-surface:#ffffff; --ic-surface-2:#f6f6fe; --ic-bg:#f4f4fb;
  --ic-border:#e6e6f7; --ic-border-strong:#c9c9ee;
  --ic-text:#191934; --ic-muted:#56568a; --ic-faint:#7676a8;
  --ic-accent:#4f46e5; --ic-accent-ink:#3730a3; --ic-accent-soft:#eef2ff; --ic-accent-line:#c7d2fe;
  --ic-warn-bg:#fff8e8; --ic-warn-line:#f2c14e; --ic-warn-ink:#7a4d05;
  --ic-bad-bg:#fef2f2; --ic-bad-line:#f5a3a3; --ic-bad-ink:#9a1c1c;
  font-family:'DM Sans',system-ui,-apple-system,'Segoe UI',sans-serif; color:var(--ic-text); font-size:14px; line-height:1.45; text-align:left;
}
.nr *, .nr *::before, .nr *::after { box-sizing:border-box; }
.nr svg { width:15px; height:15px; flex:none; }
.nr input, .nr select { margin:0; }
.nr-eyebrow { font-size:11.5px; font-weight:600; color:var(--ic-muted); text-transform:uppercase; letter-spacing:.06em; }
.nr-muted { color:var(--ic-faint); }
.nr-sub { font-size:11.5px; color:var(--ic-faint); }
.nr-btn { display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 13px; border:1px solid var(--ic-border-strong);
  background:var(--ic-surface); color:var(--ic-text); border-radius:8px; font:600 13px 'DM Sans',system-ui,sans-serif; cursor:pointer; white-space:nowrap; }
.nr-btn:hover { border-color:var(--ic-accent); color:var(--ic-accent-ink); }
.nr-btn.primary { background:var(--ic-accent); border-color:var(--ic-accent); color:#fff; }
.nr-btn.primary:hover { background:var(--ic-accent-ink); color:#fff; }
.nr-btn.small { height:30px; padding:0 10px; font-size:12.5px; }
.nr-btn.ghost { border-color:transparent; background:none; color:var(--ic-accent-ink); padding:0 8px; }
.nr-in { height:38px; padding:0 10px; border:1px solid var(--ic-border-strong); border-radius:8px; background:var(--ic-surface);
  color:var(--ic-text); font:500 13.5px 'DM Sans',system-ui,sans-serif; outline:none; }
.nr-in:focus { border-color:var(--ic-accent); box-shadow:0 0 0 3px var(--ic-accent-soft); }
select.nr-in { appearance:none; -webkit-appearance:none; padding-right:32px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position:right 10px center; }
.nr-note { padding:10px 12px; border-radius:10px; font-size:12.5px; border:1px solid var(--ic-border); background:var(--ic-surface-2); color:var(--ic-muted); }
.nr-note.warn { background:var(--ic-warn-bg); border-color:var(--ic-warn-line); color:var(--ic-warn-ink); }
.nr-note.bad { background:var(--ic-bad-bg); border-color:var(--ic-bad-line); color:var(--ic-bad-ink); font-weight:600; }
.nr-loading { display:flex; align-items:center; gap:9px; padding:18px 4px; color:var(--ic-muted); font-size:13.5px; }
.nr-spin { width:14px; height:14px; flex:none; border:2px solid var(--ic-accent-line); border-top-color:var(--ic-accent); border-radius:50%; animation:icSpin .7s linear infinite; }
.nr-empty { text-align:center; padding:28px 12px; color:var(--ic-muted); font-size:13px; }

/* tones: summary tiles, cards */
.nr-tone-indigo { --tone:#4f46e5; } .nr-tone-green { --tone:#15803d; } .nr-tone-amber { --tone:#b45309; }
.nr-tone-purple { --tone:#7c3aed; } .nr-tone-red { --tone:#b91c1c; }

/* cells */
.nr-client { display:flex; align-items:center; gap:9px; min-width:0; }
.nr-av { width:30px; height:30px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center; color:#fff; font-size:11.5px; font-weight:700; }
.nr-client > span:last-child { display:flex; flex-direction:column; min-width:0; }
.nr-cn { font-weight:600; line-height:1.3; overflow:hidden; text-overflow:ellipsis; }
.nr-ce { font-size:11.5px; color:var(--ic-faint); text-decoration:none; overflow:hidden; text-overflow:ellipsis; }
.nr-ce:hover { color:var(--ic-accent); text-decoration:underline; }
.nr-score { display:inline-flex; width:26px; height:22px; align-items:center; justify-content:center; border-radius:6px; font-weight:700; font-size:12px; }
.nr-s-hi { background:#e9f8f0; color:#146c43; } .nr-s-mid { background:#fff6e5; color:#8a5a00; }
.nr-s-lo { background:#fef2f2; color:#9a1c1c; } .nr-s-na { background:#f1f1f7; color:#76768f; }
.nr-bar { display:block; flex:1; height:6px; min-width:54px; border-radius:3px; background:#ececf6; overflow:hidden; }
.nr-bar i { display:block; height:100%; border-radius:3px; background:var(--ic-accent); }
.nr-bar.hot i { background:#dc2626; }
.nr-eng { display:flex; flex-direction:column; gap:3px; min-width:130px; }
.nr-eng-top { display:flex; align-items:center; gap:8px; }
.nr-eng-top b { width:20px; text-align:right; font-variant-numeric:tabular-nums; }
.nr-flag { width:fit-content; font-size:11px; font-weight:700; padding:2px 8px; border-radius:999px; background:#fef2f2; color:#9a1c1c; border:1px solid #f5c2c2; }
.nr-flag.train { background:#fff6e5; color:#8a5a00; border-color:#f3d79b; }
.nr-pct { display:flex; align-items:center; gap:8px; min-width:110px; font-variant-numeric:tabular-nums; font-size:12.5px; color:var(--ic-muted); }
.nr-chip { display:inline-flex; align-items:center; height:24px; padding:0 9px; border-radius:999px; font-size:12px; font-weight:700; border:1px solid transparent; white-space:nowrap; }
.nr-age-current { background:#e9f8f0; color:#146c43; border-color:#b6e6cd; }
.nr-age-1_30 { background:#fff6e5; color:#8a5a00; border-color:#f3d79b; }
.nr-age-31_60 { background:#fff0e6; color:#9a3412; border-color:#f8c9a8; }
.nr-age-61_90, .nr-age-90_plus { background:#fef2f2; color:#9a1c1c; border-color:#f5c2c2; }
.nr-st-unpaid { background:#fef2f2; color:#9a1c1c; border-color:#f5c2c2; }
.nr-st-partial { background:#fff6e5; color:#8a5a00; border-color:#f3d79b; }
.nr-st-paid { background:#e9f8f0; color:#146c43; border-color:#b6e6cd; }

/* ---- compact card ---- */
.nr-card { background:var(--ic-surface); border:1px solid var(--ic-border); border-radius:14px; padding:16px; margin:10px 0 6px;
  display:flex; flex-direction:column; gap:12px; box-shadow:0 1px 2px rgba(79,70,229,.05); max-width:560px; }
.calc-pane .nr-card { max-width:none; width:100%; margin:0 0 12px; }
.nr-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.nr-head h2 { margin:0; font-size:17px; font-weight:700; letter-spacing:-.01em; color:var(--ic-text); }
.nr-range { font-size:13px; color:var(--ic-text); }
.nr-range strong { font-variant-numeric:tabular-nums; }
.nr-tiles { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.nr-tile { padding:10px 12px; border-radius:10px; background:var(--ic-surface-2); border:1px solid var(--ic-border); border-left:3px solid var(--tone); }
.nr-tile span { display:block; font-size:11.5px; font-weight:600; color:var(--ic-muted); }
.nr-tile b { display:block; font-size:19px; font-weight:700; font-variant-numeric:tabular-nums; }
.nr-mini { border:1px solid var(--ic-border); border-radius:10px; overflow:hidden; }
.nr-mini table { width:100%; border-collapse:collapse; font-size:13px; border:none; border-radius:0; background:none; }
.nr-mini th { background:var(--ic-surface-2); text-align:left; padding:8px 10px; font-size:11px; font-weight:700; color:var(--ic-faint);
  text-transform:uppercase; letter-spacing:.04em; border-bottom:1px solid var(--ic-border); }
.nr-mini td { padding:8px 10px; border-bottom:1px solid var(--ic-border); vertical-align:middle; }
.nr-mini tr:last-child td { border-bottom:none; }
.nr-mini .r, .nr-table .r { text-align:right; font-variant-numeric:tabular-nums; }
.nr-mini .nr-av { width:26px; height:26px; font-size:10.5px; }
.nr-foot { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.nr-foot > span { flex:1; font-size:12.5px; }

/* ---- full view ---- */
html.nr-lock, html.nr-lock body { overflow:hidden; }
.nr-full { position:fixed; inset:0; z-index:5000; background:var(--ic-bg); overflow-y:auto; display:flex; flex-direction:column; }
.nr-bar-top { position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:14px; height:56px; padding:0 18px;
  background:var(--ic-surface); border-bottom:1px solid var(--ic-border); }
.nr-bar-t { flex:1; display:flex; flex-direction:column; align-items:center; line-height:1.2; }
.nr-bar-t b { font-size:15px; }
.nr-x { width:34px; height:34px; border-radius:8px; border:1px solid var(--ic-border); background:var(--ic-surface); color:var(--ic-muted);
  display:flex; align-items:center; justify-content:center; cursor:pointer; }
.nr-x:hover { border-color:var(--ic-bad-line); color:var(--ic-bad-ink); }
.nr-page { width:100%; max-width:1400px; margin:0 auto; padding:22px 24px 40px; display:flex; flex-direction:column; gap:16px; }
.nr-hero h1 { margin:0; font-size:26px; font-weight:700; letter-spacing:-.02em; color:var(--ic-text); }
.nr-hero p { margin:4px 0 0; color:var(--ic-muted); font-size:13.5px; }
.nr-panel { background:var(--ic-surface); border:1px solid var(--ic-border); border-radius:14px; padding:18px 20px; display:flex; flex-direction:column; gap:12px;
  box-shadow:0 1px 2px rgba(79,70,229,.05); }
.nr-controls { display:grid; grid-template-columns:auto 1fr; gap:12px 18px; align-items:center; }
.nr-ctl-label { font-size:12.5px; font-weight:600; color:var(--ic-muted); white-space:nowrap; }
.nr-pills { display:flex; flex-wrap:wrap; gap:7px; align-items:center; }
.nr-pill { height:34px; padding:0 14px; border-radius:999px; border:1px solid var(--ic-border-strong); background:var(--ic-surface); color:var(--ic-muted);
  font:600 12.5px 'DM Sans',system-ui,sans-serif; cursor:pointer; }
.nr-pill:hover { border-color:var(--ic-accent-line); background:var(--ic-accent-soft); color:var(--ic-accent-ink); }
.nr-pill[aria-pressed="true"] { background:var(--ic-accent); border-color:var(--ic-accent); color:#fff; box-shadow:0 2px 8px rgba(79,70,229,.25); }
.nr-custom { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--ic-muted); }
.nr-num { width:70px; }
.nr-strip { display:flex; flex-wrap:wrap; align-items:center; gap:10px 16px; padding-top:12px; border-top:1px solid var(--ic-border); }
.nr-range-l { font-size:14px; }
.nr-range-l strong { font-variant-numeric:tabular-nums; }
.nr-asof { margin-left:auto; display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--ic-muted); }
.nr-upd { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--ic-accent-ink); }
.nr-method { font-size:12.5px; color:var(--ic-muted); }
.nr-method summary { cursor:pointer; font-weight:600; color:var(--ic-accent-ink); }
.nr-method p { margin:8px 0 0; line-height:1.55; max-width:90ch; }
.nr-cards { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:12px; }
.nr-scard { background:var(--ic-surface); border:1px solid var(--ic-border); border-left:3px solid var(--tone); border-radius:12px; padding:13px 16px; }
.nr-scard span { display:block; font-size:12px; font-weight:600; color:var(--ic-faint); margin-bottom:3px; }
.nr-scard b { font-size:22px; font-weight:700; font-variant-numeric:tabular-nums; }
.nr-tablewrap { background:var(--ic-surface); border:1px solid var(--ic-border); border-radius:14px; overflow:hidden; box-shadow:0 1px 2px rgba(79,70,229,.05); }
.nr-tools { display:flex; flex-wrap:wrap; gap:9px; align-items:center; padding:12px 16px; border-bottom:1px solid var(--ic-border); }
.nr-tools h2 { margin:0 auto 0 0; font-size:15px; font-weight:700; }
.nr-search { position:relative; display:flex; align-items:center; }
.nr-search svg { position:absolute; left:10px; color:var(--ic-faint); pointer-events:none; }
.nr-search input { height:38px; width:230px; padding:0 10px 0 32px; border:1px solid var(--ic-border-strong); border-radius:8px;
  font:500 13.5px 'DM Sans',system-ui,sans-serif; outline:none; background:var(--ic-surface); color:var(--ic-text); }
.nr-search input:focus { border-color:var(--ic-accent); box-shadow:0 0 0 3px var(--ic-accent-soft); }
.nr-count { font-size:12px; font-weight:600; color:var(--ic-muted); background:var(--ic-surface-2); border:1px solid var(--ic-border); padding:4px 10px; border-radius:999px; }
.nr-scroll { overflow:auto; max-height:calc(100vh - 170px); }
.nr-table { width:100%; border-collapse:collapse; font-size:13px; border:none; border-radius:0; background:none; }
.nr-table thead th { position:sticky; top:0; z-index:1; text-align:left; padding:10px 14px; font-size:11.5px; font-weight:700; color:var(--ic-faint);
  background:var(--ic-surface-2); border-bottom:1px solid var(--ic-border); white-space:nowrap; text-transform:uppercase; letter-spacing:.04em; }
.nr-table th button { all:unset; cursor:pointer; display:inline-flex; align-items:center; gap:4px; }
.nr-table th button span { font-size:10px; opacity:.45; }
.nr-table th.on, .nr-table th button:hover { color:var(--ic-accent-ink); }
.nr-table th.on button span { opacity:1; }
.nr-table td { padding:10px 14px; border-bottom:1px solid var(--ic-border); white-space:nowrap; vertical-align:middle; }
.nr-table tbody tr:hover { background:#fafaff; }
@media (max-width:768px) {
  .nr-page { padding:14px; }
  .nr-controls { grid-template-columns:1fr; gap:6px; }
  .nr-asof { margin-left:0; }
  .nr-search input { width:100%; }
  .nr-search { flex:1 1 100%; }
  .nr-bar-t { display:none; }
}

/* chat line pointing at a report in the pane */
.nr-moved { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:8px 0 2px; padding:10px 12px; border-radius:11px;
  border:1px solid #c7d2fe; background:#eef2ff; color:#3730a3; font-size:13.5px; }
.nr-moved .nr-moved-t { flex:1; min-width:0; }
.nr-moved b { color:#1e1b4b; }
.nr-moved button { border:1px solid #a5b4fc; background:#fff; color:#3730a3; border-radius:8px; padding:5px 11px;
  font-family:inherit; font-size:12.5px; font-weight:600; cursor:pointer; }
.nr-moved button:hover { background:#e0e7ff; }
.nr-moved button.pri { background:#4f46e5; border-color:#4f46e5; color:#fff; }
.nr-asof { white-space:nowrap; }

/* ===== CRM widget: the ChatBot page inside the embedded panel =====
   widget.html puts the same split layout under its own header, so the bubble
   works like the ChatBot page: chat on the left; client, cart, calculator and
   saved items on the right. It is a panel rather than a page, so the pane stays
   from a narrower width and everything is a little tighter. */
body.nova-embed { height: 100%; background: #fff; }
body.nova-embed #app { flex: 1; min-height: 0; height: auto; }
body.nova-embed .split { flex: 1; min-height: 0; }
body.nova-embed .messages { padding: 18px 0; }
body.nova-embed .messages-inner { padding: 0 16px; gap: 18px; }
body.nova-embed .bubble { font-size: var(--chat-fs, 14px); padding: 11px 14px; }
body.nova-embed .composer { padding: 10px 0 12px; }
body.nova-embed .composer-inner { padding: 0 14px; }
body.nova-embed .hint { margin-top: 7px; font-size: 10.5px; }
body.nova-embed .calc-pane { flex: 0 0 min(500px, 48%); }
body.nova-embed .calc-pane-body { padding: 12px; }
@media (max-width: 1200px) {
  body.nova-embed .calc-pane { display: flex; }
}
/* Too narrow for two columns: the client and cart bar stays, across the top,
   and quotes go back into the conversation. */
@media (max-width: 700px) {
  body.nova-embed .split { flex-direction: column; }
  body.nova-embed .calc-pane { order: -1; flex: none; border-left: 0; border-bottom: 1px solid var(--line); }
  body.nova-embed .calc-pane-hd, body.nova-embed .calc-pane-body { display: none; }
}

/* ===== Save on the price card (the cart is off for now) =====
   Save sits where Add to cart was: the one button that keeps a quote. Saved
   items head the right-hand pane, under a compact client button. */
.pq-savebtn { flex: 1; padding: 8px 12px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534;
  font-family: inherit; font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.pq-savebtn:hover { border-color: #16a34a; background: #dcfce7; }
.pq-savebtn.on { background: #16a34a; border-color: #16a34a; color: #fff; }
.pq-savebtn.on:hover { background: #15803d; }
.shelf-busy { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--indigo-dark); font-size: 10.5px; }
.shelf-busy::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 5px;
  border: 2px solid var(--indigo); border-top-color: transparent; border-radius: 50%;
  vertical-align: -1px; animation: shelfSpin .7s linear infinite; }
@keyframes shelfSpin { to { transform: rotate(360deg); } }
.shelf-client { text-transform: none; letter-spacing: 0; font-weight: 500; color: #166534; font-size: 10.5px; }
.shelf-disc { flex: none; font-size: 10px; font-weight: 700; color: #166534; background: #dcfce7;
  border: 1px solid #bbf7d0; border-radius: 5px; padding: 0 5px; }
.shelf-rows td s { color: var(--muted); font-weight: 500; margin-right: 3px; }
/* The client button only takes the room its name needs. */
.calc-pane > .client-bar { padding: 8px 14px; }
.calc-pane > .client-bar .cbar-btn { flex: 0 1 auto; max-width: 100%; padding: 5px 12px; font-size: 12px; }
.calc-pane > .client-bar.on .cbar-btn { padding: 6px 12px; }

/* ===== "Order now" links (product page with every option selected) ===== */
.pq-orderlink { border: none; background: none; padding: 0; margin-left: 6px; font-family: inherit;
  font-size: 11.5px; font-weight: 700; color: var(--indigo-dark); cursor: pointer; text-decoration: underline; }
.pq-orderlink:disabled { opacity: .6; cursor: default; }
.pq-moved .pq-moved-order { margin-left: auto; border-color: #bbf7d0; background: #f0fdf4; color: #166534; }
.pq-moved .pq-moved-order:hover { border-color: #16a34a; background: #dcfce7; }
.pq-moved .pq-moved-order + .pq-moved-show { margin-left: 6px; }
.shelf-rows td.shelf-order { text-align: right; width: 1%; white-space: nowrap; padding-left: 8px; }
.shelf-rows td.shelf-order button { border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; font-family: inherit;
  font-size: 10.5px; font-weight: 600; border-radius: 6px; padding: 2px 8px; cursor: pointer; }
.shelf-rows td.shelf-order button:hover { border-color: #16a34a; background: #dcfce7; }
.draft-t td.dr-order { text-align: right; white-space: nowrap; }
.draft-t td.dr-order a { color: var(--indigo-dark); font-weight: 700; font-size: 12.5px; }
.draft-mail-box [contenteditable] { outline: none; border-radius: 6px; padding: 2px 4px; margin: 0 -4px 10px; }
.draft-mail-box [contenteditable]:hover { background: #fafaff; }
.draft-mail-box [contenteditable]:focus { background: #f5f3ff; }
.draft-mail-box p { margin: 0 0 8px; font-size: 13px; line-height: 1.55; }

/* ===== Saved: Send all to CRM + Help to draft email, side by side ===== */
.shelf-acts-row { display: flex; gap: 7px; margin-top: 4px; }
.shelf-acts-row .shelf-all { flex: 1 1 0; width: auto; margin-top: 0; }
.shelf-mail { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px; border: 1px solid #c7d2fe; background: #eef2ff; color: #3730a3; font-family: inherit;
  font-size: 12.5px; font-weight: 600; border-radius: 9px; cursor: pointer; }
.shelf-mail:hover { border-color: var(--indigo); background: #e0e7ff; }
.shelf-mail svg { width: 14px; height: 14px; flex: none; }

/* ===== The drafted reply, in the conversation ===== */
.mail-wait { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.mail-card { border: 1px solid #ddd6fe; border-radius: 12px; background: #fff; padding: 12px 14px; }
.mail-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.mail-hd svg { width: 16px; height: 16px; color: var(--indigo-dark); flex: none; }
.mail-to { color: var(--muted); font-size: 12.5px; }
.mail-tone { font-size: 11.5px; color: var(--muted); margin: 4px 0 10px; }
.mail-subj { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.mail-subj span { flex: none; font-weight: 600; }
.mail-subj input { flex: 1; min-width: 0; margin: 0; padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.mail-body { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.mail-body [contenteditable] { outline: none; border-radius: 6px; padding: 2px 4px; margin: 0 -4px 8px; }
.mail-body [contenteditable]:hover { background: #fafaff; }
.mail-body [contenteditable]:focus { background: #f5f3ff; }
.mail-body p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.55; }
.mail-acts { display: flex; gap: 8px; margin-top: 10px; }
.mail-acts button { padding: 8px 14px; border-radius: 9px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.mail-copy { border: 1px solid var(--indigo); background: var(--indigo); color: #fff; }
.mail-copy:hover { background: var(--indigo-dark); }
.mail-copysubj { border: 1px solid var(--line); background: #fff; color: var(--ink-soft); }
.mail-copysubj:hover { border-color: var(--indigo); color: var(--indigo-dark); }

/* ===== Nova for clients (client-chat.js) ===== */
.cc { display: flex; flex-direction: column; min-height: 0; flex: 1; background: #fff; }
.cc-msgs { flex: 1; overflow-y: auto; padding: 18px 0; }
.cc-inner { max-width: 760px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 16px; }
.cc .bubble { font-size: 14px; padding: 11px 14px; }
.cc .bubble p { margin: 0 0 6px; } .cc .bubble p:last-child { margin-bottom: 0; }
.cc .bubble ul { margin: 4px 0 6px 18px; }
.cc .bubble a { color: var(--indigo-dark); font-weight: 600; }
.cc-composer { border-top: 1px solid var(--line); padding: 10px 0 12px; }
.cc-composer > * { max-width: 760px; margin-left: auto; margin-right: auto; padding: 0 16px; }
.cc-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
/* Rate this chat (client chat): a slim strip above the box after the first answer. */
.cc-rate { margin: 0 0 8px; padding: 8px 10px 8px 12px; border: 1px solid #e4e6f2; border-radius: 12px; background: #fafbff; font-size: 13px; color: #374151; }
.cc-rate[hidden] { display: none; }
.cc-rate-q { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cc-rate-t { font-weight: 600; flex: 1; min-width: 150px; }
.cc-stars { display: inline-flex; gap: 2px; }
.cc-stars button { width: 30px; height: 30px; padding: 3px; border: 0; background: none; cursor: pointer; border-radius: 8px; }
.cc-stars button svg { width: 100%; height: 100%; fill: none; stroke: #c3c7d6; stroke-width: 1.6; stroke-linejoin: round; transition: fill .12s, stroke .12s; }
.cc-stars button.on svg { fill: #f5b301; stroke: #e0a100; }
.cc-stars button:focus-visible { outline: 2px solid #6366f1; outline-offset: 1px; }
.cc-rate.done .cc-stars button { cursor: default; }
.cc-rate-x { width: 26px; height: 26px; border: 0; background: none; color: #9ca3af; font-size: 18px; line-height: 1; cursor: pointer; border-radius: 7px; }
.cc-rate-x:hover { background: #eef0f7; color: #4b5563; }
.cc-rate.done .cc-rate-x { display: none; }
.cc-rate-more { display: flex; gap: 6px; margin-top: 8px; }
.cc-rate-more[hidden] { display: none; }
.cc-rate-more input { flex: 1; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid #d9dcea; border-radius: 9px; font: inherit; font-size: 13px; background: #fff; }
.cc-rate-more input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px #eef2ff; }
.cc-rate-send { height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: #6366f1; color: #fff; font: 600 13px/1 inherit; cursor: pointer; }
.cc-shell { display: flex; gap: 8px; align-items: flex-end; }
.cc-shell textarea { flex: 1; resize: none; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px;
  font-family: inherit; font-size: 14px; outline: none; max-height: 120px; }
.cc-shell textarea:focus { border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.cc-send { flex: none; width: 40px; height: 40px; border: none; border-radius: 11px; background: var(--indigo); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.cc-send svg { width: 17px; height: 17px; } .cc-send:disabled { opacity: .5; cursor: default; }
.cc-hint { font-size: 10.5px; color: var(--muted); text-align: center; margin-top: 6px; }
.cc-err { color: #b91c1c; }
/* One product per line: picture, name on a single line, the page arrow. */
.cc-prods { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.cc-prod { display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box; padding: 4px 8px 4px 4px; border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: var(--ink) !important; font-weight: 600 !important; font-size: 12.5px; background: #fff; }
.cc-prod:hover { border-color: var(--indigo); background: #f8f7ff; }
.cc-prod.cc-later { display: none; }
/* how well a listed product matches the request (same colours as the staff chat) */
.cc-match { flex: none; font-style: normal; font-size: 10px; font-weight: 600; line-height: 16px; padding: 0 6px; border-radius: 20px; white-space: nowrap; }
.cc-match.hi { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.cc-match.mid { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.cc-match.lo { background: #eef1f5; color: #64748b; border: 1px solid #dfe4ea; }
.cc-prods-more { align-self: flex-start; margin-top: 2px; padding: 6px 12px; border: 1.5px dashed #c7d2fe; border-radius: 8px; background: #fff;
  color: var(--indigo-dark); font: 600 12px/1 inherit; cursor: pointer; }
.cc-prods-more:hover { border-style: solid; background: var(--indigo-light); }
.cc-prod > span:not(.cc-ph) { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-prod img, .cc-ph { width: 36px; height: 36px; border-radius: 7px; object-fit: cover; flex: none; border: 1px solid var(--line); background: #f4f4f9; }
.cc-price { margin-top: 8px; border: 1px solid #e0dbf7; border-radius: 12px; padding: 11px 13px; background: linear-gradient(160deg,#fbfaff,#f5f3ff); }
.cc-price-hd { display: flex; align-items: center; gap: 10px; }
.cc-price-hd img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.cc-price-hd > div:nth-child(2), .cc-price-hd > div:first-child:not(.cc-price-n) { flex: 1; min-width: 0; }
.cc-price-hd b { display: block; font-size: 13.5px; } .cc-price-hd small { display: block; font-size: 11.5px; color: var(--muted); }
.cc-price-n { text-align: right; font-size: 19px; font-weight: 700; color: var(--indigo-dark); }
.cc-price-n s { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.cc-price-n small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.cc-price table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.cc-price td { padding: 4px 0; border-top: 1px solid #ebe8f8; } .cc-price td:first-child { color: var(--muted); width: 42%; }
.cc-order { display: block; text-align: center; margin-top: 10px; padding: 9px; border-radius: 9px; background: var(--indigo);
  color: #fff !important; text-decoration: none; font-size: 13px; }
.cc-order:hover { background: var(--indigo-dark); }
.cc-note { font-size: 10.5px; color: var(--muted); margin-top: 6px; text-align: center; }
.cc-orders { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.cc-ord { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12.5px; }
.cc-ord > div { flex: 1; min-width: 0; } .cc-ord small { display: block; color: var(--muted); font-size: 11px; }
.cc-st { flex: none; font-size: 11px; font-weight: 600; color: var(--indigo-dark); background: var(--indigo-light); border-radius: 7px; padding: 3px 8px; }

/* ===== Nova for clients: quote pane + Qty · Price · Add to Cart ===== */
.cc.cc { flex-direction: row; }   /* doubled: wins over a host container's own column layout */
.cc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.cc-pane { display: none; }
.cc.cc-wide .cc-pane { display: flex; flex-direction: column; flex: 0 0 min(396px, 46%); min-height: 0;
  border-left: 1px solid var(--line); background: #fbfbfe; }
.cc-pane-hd { flex: none; padding: 11px 16px; border-bottom: 1px solid var(--line); background: #fff; font-size: 11px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.cc-pane-body { flex: 1; overflow-y: auto; padding: 14px; min-height: 0; }
.cc-pane-body .cc-price { margin: 0 0 12px; background: #fff; }
.cc-pane-empty { color: var(--muted); font-size: 12.5px; line-height: 1.6; padding: 22px 8px; text-align: center; }
.cc-moved { margin-top: 8px; padding: 8px 11px; border: 1px dashed #c7d2fe; border-radius: 9px; background: #f5f7ff;
  font-size: 12.5px; color: var(--ink-soft); }
.cc-price .cc-specs { margin-top: 8px; }
.cc-ladder { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.cc-ladder th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); padding: 0 0 5px; border: none !important; }
.cc-ladder td { padding: 8px 0; border-top: 1px solid #ebe8f8; vertical-align: middle; }
.cc-ladder td:first-child { font-weight: 700; color: var(--ink) !important; width: 22%; }
.cc-ladder td:nth-child(2) b { color: var(--indigo-dark); font-size: 14px; }
.cc-ladder td:nth-child(2) s { color: var(--muted); font-size: 11.5px; }
.cc-ladder td:nth-child(2) small { display: block; font-size: 11px; color: var(--muted); }
.cc-ladder td:last-child { text-align: right; width: 1%; white-space: nowrap; }
.cc-cart { display: inline-block; padding: 7px 13px; border-radius: 8px; background: var(--indigo); color: #fff !important;
  font-size: 12.5px; font-weight: 700 !important; text-decoration: none; }
.cc-cart:hover { background: var(--indigo-dark); }
.cc-cart.busy { opacity: .7; pointer-events: none; }
.cc-cart.done { background: #16a34a; }
.cc-cart.done[data-cart] { cursor: pointer; }
.cc-cart.done[data-cart]:hover { background: #15803d; }
.cc-ord-img { position: relative; flex: none; width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #f4f4f9; display: block; }
.cc-ord-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-ord-img span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 700; text-align: center;
  color: #fff; background: rgba(30,27,46,.55); padding: 1px 0; }
.cc-ord-img:hover { border-color: var(--indigo); }
.cc-prod { cursor: pointer; position: relative; }
.cc-prod.chosen { border-color: var(--indigo); background: var(--indigo-light); }
.cc-prod.dim { opacity: .55; }
.cc-prod-link { flex: none; margin-left: 2px; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; text-decoration: none;
  color: var(--muted) !important; background: #fff; }
.cc-prod-link:hover { border-color: var(--indigo); color: var(--indigo-dark) !important; }

/* ===== Nova for clients: templates and installation / delivery estimates ===== */
.cc-tpl, .cc-est { margin-top: 8px; border: 1px solid #e0dbf7; border-radius: 12px; padding: 11px 13px; background: linear-gradient(160deg,#fbfaff,#f5f3ff); }
.cc-tpl-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13.5px; }
.cc-tpl-hd img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.cc-tpl-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #ebe8f8; font-size: 13px; }
.cc-tpl-row > div { flex: 1; min-width: 0; }
.cc-tpl-row small { display: block; font-size: 11px; color: var(--muted); }
.cc-tpl-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-est-hd { display: flex; align-items: flex-start; gap: 10px; }
.cc-est-hd > div:first-child { flex: 1; min-width: 0; font-size: 13.5px; }
.cc-est-hd small { display: block; font-size: 11.5px; color: var(--muted); }
.cc-est-n { font-size: 20px; font-weight: 700; color: var(--indigo-dark); white-space: nowrap; }
.cc-est-n span { font-size: 13px; color: #92400e; background: #fef3c7; border-radius: 7px; padding: 3px 8px; }
.cc-est table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12.5px; }
.cc-est td { padding: 5px 0; border-top: 1px solid #ebe8f8; } .cc-est td:last-child { text-align: right; font-weight: 600; }
.cc-est-miss { margin-top: 8px; font-size: 12px; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 9px; }

/* ---- client chat: attachments ---- */
.cc-main { position: relative; }
.cc-attach { flex: none; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cc-attach:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.cc-attach svg { width: 18px; height: 18px; }
.cc-send.wait { opacity: .6; }
.cc-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cc-file { display: inline-flex; align-items: center; gap: 7px; max-width: 250px; padding: 4px 4px 4px 4px; border: 1px solid var(--line);
  border-radius: 9px; background: #fafaff; font-size: 12px; }
.cc-file img, .cc-file > i { flex: none; width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); }
.cc-file > i, .cc-sent-file i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 9.5px; font-weight: 800;
  color: var(--indigo-dark); background: var(--indigo-light); letter-spacing: .03em; }
.cc-file-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.cc-file-n small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; }
.cc-file button { flex: none; width: 22px; height: 22px; border: none; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.cc-file button:hover { background: #fee2e2; color: #b91c1c; }
.cc-file.up { opacity: .75; } .cc-file.up small { color: var(--indigo-dark); }
.cc-file.err { border-color: #fecaca; background: #fef2f2; } .cc-file.err small { color: #b91c1c; }
.cc-sent-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; align-items: flex-start; }
.cc-sent-files:last-child { margin-bottom: 0; }
.cc-sent-files img { max-width: 160px; max-height: 120px; border-radius: 8px; border: 1px solid rgba(255,255,255,.5); display: block; }
.cc-sent-file { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 8px; background: rgba(255,255,255,.18);
  font-size: 12px; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-sent-file i { width: 26px; height: 26px; border-radius: 6px; flex: none; }
.cc-drop { display: none; position: absolute; inset: 8px; z-index: 5; border: 2px dashed var(--indigo); border-radius: 14px;
  background: rgba(245,243,255,.92); color: var(--indigo-dark); font-weight: 700; font-size: 15px; align-items: center; justify-content: center; pointer-events: none; }
.cc-main.cc-dragging .cc-drop { display: flex; }

/* ---- client chat: Specified / Default / Questionable, and Edit ---- */
.cc-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap; cursor: help; }
.cc-t-spec { background: #dcfce7; color: #166534; }
.cc-t-def { background: #f1f5f9; color: #64748b; }
.cc-t-q { background: #ffedd5; color: #c2410c; }
.cc-price tr.cc-q td { background: #fff7ed; }
.cc-price tr.cc-q td:first-child { color: #c2410c; font-weight: 600; padding-left: 6px; border-radius: 6px 0 0 6px; }
.cc-unsure-note { margin-top: 8px; font-size: 11.5px; color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 6px 9px; }
.cc-edit-btn { flex: none; margin-left: auto; padding: 6px 11px; border-radius: 8px; border: 1.5px solid #c7d2fe; background: #fff;
  color: var(--indigo-dark); font: 600 12px/1 inherit; cursor: pointer; }
.cc-edit-btn:hover { border-color: var(--indigo); background: var(--indigo-light); }
.cc-price.editing .cc-specs, .cc-price.editing .cc-unsure-note, .cc-price.editing .cc-edit-btn { display: none; }
.cc-price.editing .cc-ladder { opacity: .45; }
.cc-edit { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.cc-edit label, .cc-wh { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cc-edit label.cc-q > span:first-child { color: #c2410c; }
.cc-edit select, .cc-edit input { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); padding: 8px 10px; border: 1.5px solid var(--line);
  border-radius: 9px; background: #fff; width: 100%; box-sizing: border-box; }
.cc-edit label.cc-q select, .cc-edit label.cc-q input { border-color: #fdba74; }
.cc-edit select:focus, .cc-edit input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.cc-wh { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px; }
.cc-wh > span { width: 100%; }
.cc-wh input { width: 90px; flex: 1; }
.cc-edit-btns { display: flex; gap: 8px; }
.cc-upd { flex: 1; padding: 10px; border: none; border-radius: 9px; background: var(--indigo); color: #fff; font: 600 13px/1 inherit; cursor: pointer; }
.cc-upd:disabled { opacity: .7; }
.cc-cancel { padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font: 600 13px/1 inherit; cursor: pointer; }
.cc-edit-err { color: #b91c1c; font-size: 12px; }
.cc-edit-err:empty { display: none; }

/* ---- client chat: phones ---- */
@media (max-width: 700px) {
  .cc-shell textarea, .cc-edit select, .cc-edit input { font-size: 16px; }   /* stops iOS zooming in on focus */
  .cc-composer { padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
  .cc-composer > * { padding: 0 10px; }
  .cc-inner { padding: 0 10px; gap: 12px; }
  .cc-hint { display: none; }
  .cc-sugg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cc-sugg::-webkit-scrollbar { display: none; }
  .cc-sugg .suggestion { flex: none; }
  .cc-files { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cc-files::-webkit-scrollbar { display: none; }
  .cc-file { flex: none; max-width: 210px; }
  .cc-sent-files img { max-width: 120px; max-height: 96px; }
  .cc .msg-avatar { display: none; }
  .cc .bubble { font-size: 15px; }
  .cc-ladder td:first-child { width: 18%; }
  .cc-cart { padding: 9px 12px; }
  .cc-price td:first-child { width: 38%; }
}
.cc .msg-col { min-width: 0; }
.cc .bubble { overflow-wrap: anywhere; min-width: 0; }

/* ---- client chat: designs priced together as versions ---- */
.cc-vers { margin-top: 8px; border: 1px solid #e0dbf7; border-radius: 9px; background: #fff; padding: 6px 10px; font-size: 12px; }
.cc-vers-hd { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--indigo-dark); margin-bottom: 3px; }
.cc-ver { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-top: 1px solid #f0eefb; }
.cc-ver:first-of-type { border-top: 0; }
.cc-ver span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-ladder td:first-child small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); }
.cc-ev { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cc-ev-row { display: flex; align-items: center; gap: 8px; }
.cc-ev-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-ev-row input { width: 110px !important; flex: none; }
.cc-price.editing .cc-vers { display: none; }
.cc-ev { gap: 4px; }
.cc-ev-row { margin: 0; }
.cc-ev-row input { padding: 6px 9px !important; }
.cc-ev-row span { font-weight: 500; color: var(--ink); }
.cc-edit input, .cc-edit select { margin: 0; }

/* ---- client chat: Add to Cart (job name step, added card) ---- */
.cc-addrow td { padding: 0 0 10px !important; border-top: 0 !important; width: auto !important; white-space: normal !important;
  text-align: left !important; font-weight: 400 !important; }
.cc-pane, .cc-main { min-width: 0; }
.cc-price { min-width: 0; overflow-wrap: anywhere; }
.cc-add { border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 9px; padding: 9px 10px; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; }
.cc-add label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.cc-add input { margin: 0; padding: 7px 9px; font-size: 14px; border-radius: 8px; }
.cc-add-btns { display: flex; gap: 6px; }
.cc-add-go { flex: 1; padding: 8px 10px; border: none; border-radius: 8px; background: var(--indigo); color: #fff; font: 600 12.5px/1.2 inherit; cursor: pointer; }
.cc-add-go:disabled { opacity: .7; }
.cc-add-x { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font: 600 12.5px/1 inherit; cursor: pointer; }
.cc-add-msg { color: var(--ink); line-height: 1.45; }
.cc-add-msg:empty { display: none; }
.cc-add-msg a { color: var(--indigo-dark); font-weight: 600; }
.cc-added { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 6px; padding: 6px 12px;
  border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 999px; font-size: 12.5px; color: #14532d; white-space: nowrap; }
.cc-added.preview { border-color: #fde68a; background: #fffbeb; color: #78350f; }
.cc-added b { font-weight: 700; flex: none; }
.cc-added-what { overflow: hidden; text-overflow: ellipsis; min-width: 0; color: #3f3f46; }
.cc-added-p { font-weight: 700; flex: none; }
.cc-added a { flex: none; color: #15803d; font-weight: 600; text-decoration: none; }
.cc-added a:hover { text-decoration: underline; }
/* after an Add to Cart click: the line sits under the answers, not in a bubble */
.cc-added-row { margin: -4px 0 14px 46px; max-width: calc(100% - 46px); }
.cc-added-row .cc-added { margin-top: 0; }
.cc-added-row .cc-would, .cc-added-row .cc-err { margin-top: 6px; }
@media (max-width: 699px) { .cc-added-row { margin-left: 0; max-width: 100%; } }
.cc-would { margin-top: 6px; font-size: 11.5px; }
.cc-would pre { max-height: 220px; overflow: auto; background: #f8f8fc; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-size: 11px; white-space: pre-wrap; }

/* ---- client chat: pane tabs (Quote / My projects) ---- */
.cc-pane-tabs { flex: none; display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); background: #fff; }
.cc-pane-tabs button { border: none; background: none; padding: 7px 10px 9px; font: 700 11px/1 inherit; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cc-pane-tabs button.on { color: var(--indigo-dark); border-bottom-color: var(--indigo); }
.cc-pane-tabs button[hidden] { display: none; }
.cc-pane-body[hidden] { display: none; }

/* ---- client chat: project snapshot (like the website's order history) ---- */
.cc-projs { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cc-pane-body .cc-projs { margin-top: 0; }
.cc-proj { border: 1px solid #e4e4ef; border-radius: 12px; background: #fff; overflow: hidden; font-size: 12px; }
.cc-proj-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 7px 11px; background: #f5f6fa; border-bottom: 1px solid #ececf3;
  font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.cc-proj-top span:first-child { font-weight: 700; color: var(--ink); letter-spacing: 0; }
.cc-proj-top b { color: var(--ink); }
.cc-pay { padding: 2px 7px; border-radius: 6px; font-weight: 700; font-size: 9.5px; letter-spacing: .04em; }
.cc-pay.paid { background: #dcfce7; color: #15803d; }
.cc-pay.unpaid { background: #fee2e2; color: #b91c1c; }
.cc-pay.canceled { background: #3f3f46; color: #fff; }
.cc-proj-main { display: flex; gap: 10px; padding: 10px 11px 4px; align-items: flex-start; }
.cc-proj-img { flex: none; width: 54px; height: 54px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #f4f4f9; display: block; }
.cc-proj-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cc-proj-img.none { background: #f4f4f9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23b8b8c8' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center no-repeat; }
.cc-proj-txt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cc-proj-txt b { font-size: 13px; color: var(--ink); line-height: 1.25; }
.cc-proj-e { font-weight: 700; font-size: 12px; color: var(--ink); }
.cc-proj-txt small { color: var(--muted); font-size: 11.5px; }
.cc-steps { display: grid; grid-template-columns: repeat(3, 1fr); padding: 8px 6px 4px; }
.cc-step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; padding: 0 3px; min-width: 0; }
.cc-step i { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #d9d9e4; background: #fff; display: block; box-sizing: border-box; }
.cc-step::before { content: ''; position: absolute; top: 10px; left: -50%; width: 100%; height: 2px; background: #e4e4ee; }
.cc-step:first-child::before { display: none; }
.cc-step.done i { background: #2e1a47; border-color: #2e1a47; }
.cc-step.done i::after { content: '\2713'; position: absolute; inset: 0; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-style: normal; }
.cc-step.done::before, .cc-step.done + .cc-step::before { background: #2e1a47; }
.cc-step.current i, .cc-step.action i, .cc-step.problem i { border-color: #2e1a47; box-shadow: 0 0 0 4px #ede9fe; }
.cc-step b { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--ink); margin-top: 2px; }
.cc-step.todo b { color: #a3a3b8; }
.cc-step span { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; border: 1px solid transparent; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-step.done span { background: #ecfdf3; color: #15803d; border-color: #bbf7d0; }
.cc-step.current span { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.cc-step.action span { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.cc-step.problem span { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.cc-step.todo span { background: #f4f4f7; color: #9a9aae; border-color: #e7e7ef; }
/* A canceled job (like the website's red CANCEL step). */
.cc-step.canceled i { background: #dc2626; border-color: #dc2626; }
.cc-step.canceled i::after { content: '\2715'; position: absolute; inset: 0; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-style: normal; }
.cc-step.canceled b { color: #dc2626; }
.cc-step.canceled span { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.cc-proj.canceled .cc-proj-main { opacity: .7; }
.cc-step small { font-size: 9.5px; color: var(--muted); line-height: 1.3; }
.cc-proj-foot { padding: 4px 11px 9px; text-align: right; }
.cc-proj-foot a { font-size: 11px; font-weight: 600; color: var(--indigo-dark) !important; text-decoration: none; }
.cc-proj-foot a:hover { text-decoration: underline; }

/* ---- client chat: dictation and a one-line composer ---- */
.cc-mic { flex: none; width: 40px; height: 40px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cc-mic:hover { border-color: var(--indigo); color: var(--indigo-dark); }
.cc-mic svg { width: 18px; height: 18px; }
.cc-mic.rec { background: #fee2e2; border-color: #f87171; color: #b91c1c; animation: ccPulse 1.2s ease-in-out infinite; }
@keyframes ccPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.35); } 50% { box-shadow: 0 0 0 6px rgba(239,68,68,0); } }
.cc-shell textarea { overflow-y: hidden; line-height: 1.35; min-height: 40px; box-sizing: border-box; margin: 0; }
.cc-shell textarea::placeholder { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-shell { gap: 6px; }
@media (max-width: 700px) {
  .cc-shell textarea::placeholder { font-size: 15px; }
  .cc-attach, .cc-mic, .cc-send { width: 38px; height: 38px; }
}

/* ---- client chat: sign-in bar and form ---- */
.pc-signin { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; background: #f5f3ff; border-bottom: 1px solid #e4e0fb;
  font-size: 12.5px; color: #4c1d95; }
.pc-signin[hidden] { display: none; }
.pc-signin span { flex: 1; min-width: 0; }
.pc-signin button { flex: none; padding: 6px 12px; border: none; border-radius: 8px; background: var(--indigo); color: #fff; font: 600 12.5px/1 inherit; cursor: pointer; }
.pc-login { position: absolute; inset: 0; z-index: 20; background: rgba(20,16,40,.35); display: flex; align-items: flex-start; justify-content: center; padding: 60px 14px 14px; }
.pc-login[hidden] { display: none; }
.pc-login form { width: 100%; max-width: 360px; background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 18px 50px rgba(30,20,70,.3); display: flex; flex-direction: column; gap: 10px; }
.pc-login h3 { margin: 0; font-size: 16px; }
.pc-login p { margin: 0; font-size: 12.5px; color: var(--muted); }
.pc-login input { margin: 0; padding: 10px 12px; font-size: 15px; border-radius: 9px; }
.pc-login .pc-login-go { padding: 11px; border: none; border-radius: 9px; background: var(--indigo); color: #fff; font: 600 14px/1 inherit; cursor: pointer; }
.pc-login .pc-login-go:disabled { opacity: .7; }
.pc-login .pc-login-x { align-self: flex-end; margin: -6px -6px -4px 0; border: none; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }
.pc-login .pc-login-err { color: #b91c1c; font-size: 12.5px; }
.pc-login .pc-login-err:empty { display: none; }
.pc-login .pc-login-links { display: flex; justify-content: space-between; font-size: 12px; }
.pc-login .pc-login-links a { color: var(--indigo-dark); font-weight: 600; text-decoration: none; }

/* ---- voice typing: the recording bar (axiom-voice.js) ---- */
.av-on > :not(.av-bar) { display: none !important; }
.av-bar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 4px 0 4px;
  border: 1.5px solid #c7d2fe; border-radius: 12px; background: #f5f7ff; box-sizing: border-box; }
.av-bar[hidden] { display: none; }
.av-bar button { flex: none; width: 34px; height: 34px; border-radius: 10px; border: none; display: flex; align-items: center;
  justify-content: center; cursor: pointer; padding: 0; margin: 0; }
.av-bar button svg { width: 17px; height: 17px; }
.av-cancel { background: transparent; color: var(--muted); }
.av-cancel:hover { background: #eef0f7; color: #b91c1c; }
.av-done { background: var(--indigo); color: #fff; }
.av-done:disabled { opacity: .55; cursor: default; }
.av-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: avBlink 1.1s ease-in-out infinite; }
@keyframes avBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.av-time { flex: none; font: 600 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #3730a3; min-width: 32px; }
.av-wave { flex: 1; min-width: 0; height: 26px; color: #6366f1; }
.av-msg { display: none; flex: 1; min-width: 0; font-size: 13px; color: #3730a3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-busy .av-dot, .av-busy .av-time, .av-busy .av-wave { display: none; }
.av-busy .av-msg { display: block; }
.av-busy .av-msg::before { content: ''; display: inline-block; width: 13px; height: 13px; margin: 0 8px -2px 2px; border-radius: 50%;
  border: 2px solid #c7d2fe; border-top-color: #6366f1; animation: avSpin .8s linear infinite; }
@keyframes avSpin { to { transform: rotate(360deg); } }
.cc-hint.cc-hint-err { display: block !important; color: #b91c1c; font-size: 12px; }
@media (max-width: 700px) {
  .av-bar { height: 46px; }
  .av-bar button { width: 36px; height: 36px; }
}
/* staff composer: the bar sits inside the input shell's own border */
.input-shell.av-on { padding: 6px; }
.input-shell .av-bar { border: none; background: transparent; height: 40px; }

/* ---- client chat: NovaAI avatar, History note ---- */
.cc-ai-av svg { width: 16px; height: 16px; }
.cc-hist-note { margin: 4px auto 14px; max-width: 520px; text-align: center; font-size: 12px; color: var(--muted);
  background: #f6f6fb; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; line-height: 1.45; }

/* ---- quote cards: "clarify" fields as yellow choices to pick right on the card ---- */
.cc-price select.cc-qsel, .cc-price input.cc-qsel { margin: 0; max-width: 100%; box-sizing: border-box; font: 600 12.5px/1.2 inherit;
  color: #78350f; background-color: #fef3c7; border: 1.5px solid #f59e0b; border-radius: 7px; padding: 4px 24px 4px 8px; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(245,158,11,.14); }
.cc-price select.cc-qsel { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2392400e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; }
.cc-price input.cc-qsel { width: 62px; padding: 4px 7px; cursor: text; }
.cc-price .cc-qsel:hover { border-color: #d97706; }
.cc-price .cc-qsel:focus { outline: none; border-color: #d97706; box-shadow: 0 0 0 3px rgba(245,158,11,.3); }
.cc-price .cc-qsel:disabled { opacity: .6; }
.cc-price.cc-busy { opacity: .7; pointer-events: none; }
@media (max-width: 700px) { .cc-price select.cc-qsel, .cc-price input.cc-qsel { font-size: 16px; } }
.cc-price tr.cc-q td { background: #fffbeb; }
.cc-price tr.cc-q td:first-child { color: #92400e; }
.cc-unsure-note { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.cc-t-q { background: #fef3c7; color: #92400e; }

/* ---- product list: name with a one-line description under it ---- */
.cc-prod > span.cc-prod-txt { display: flex; flex-direction: column; gap: 1px; white-space: normal; padding: 3px 0; }
.cc-prod-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-prod-txt small { font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.3; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-prod:has(.cc-prod-txt small) img, .cc-prod:has(.cc-prod-txt small) .cc-ph { width: 42px; height: 42px; }
/* hover / picked outline as a ring outside the border: a 1px border alone can lose
   its top row at fractional zoom (125%, 150% Windows scaling) */
.cc-prod:hover, .cc-prod:focus-visible { z-index: 1; border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo); outline: none; }
.cc-prod.chosen { z-index: 1; box-shadow: 0 0 0 1px var(--indigo); }

/* ---- quote card: "?" by the ready date, and how it was worked out ---- */
.cc-why { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin: 0 0 0 3px; padding: 0;
  border: 1px solid #c7d2fe; border-radius: 50%; background: #fff; color: var(--indigo-dark); font: 700 10px/1 inherit;
  cursor: pointer; vertical-align: 1px; }
.cc-why:hover, .cc-why.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.cc-why-pop { margin: 8px 0 4px; padding: 10px 12px; border: 1px solid #e0e4fb; border-radius: 10px; background: #f8f9ff;
  font-size: 12px; color: var(--text); line-height: 1.45; }
.cc-why-pop[hidden] { display: none; }
.cc-why-hd { font-weight: 700; font-size: 12.5px; margin-bottom: 4px; }
.cc-why-pop p { margin: 4px 0; }
.cc-why-note { color: var(--muted); font-size: 11.5px; }
.cc-why-tl { list-style: none; margin: 6px 0; padding: 0; border-left: 2px solid #e0e4fb; }
.cc-why-tl li { display: flex; gap: 10px; padding: 2px 0 2px 10px; position: relative; }
.cc-why-tl li::before { content: ''; position: absolute; left: -5px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #c7d2fe; }
.cc-why-tl li span { width: 84px; flex: none; color: var(--muted); }
.cc-why-tl li.cc-why-skipped { opacity: .6; }
.cc-why-tl li.cc-why-start::before { background: var(--indigo); }
.cc-why-tl li.cc-why-ready::before { background: #16a34a; }
.cc-why-tl li.cc-why-ready b { color: #15803d; }

/* ---- client chat: Estimated Due line and its day-by-day popup (staff .sch-* styles) ---- */
.cc-price .cc-eta { margin-top: 10px; padding-top: 9px; }
.sch-tip.cc-due-pop { position: fixed; z-index: 60; max-width: min(440px, calc(100vw - 16px)); box-sizing: border-box; }
@media (max-width: 420px) { .sch-tip.cc-due-pop .sch-day { min-width: 38px; padding: 4px 4px 5px; } }
/* client chat History: an Add to Cart from that conversation */
.cc-evt { margin: 6px auto 12px; width: fit-content; max-width: 92%; padding: 5px 12px; border-radius: 999px; font-size: 12px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }

/* a job past its due date (client chat, My projects) */
.cc-step small.cc-late { color: #b91c1c; font-weight: 600; }
/* the deadline facts under a job's steps (approved & paid · turnaround · ready · pick up / shipping) */
.cc-proj-dl { margin: 8px 12px 0; padding: 7px 10px; border-radius: 8px; background: #f6f7fb; font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.cc-proj-dl b { color: var(--ink); font-weight: 600; }

/* ===== Attachments on a sent message (ChatBot / CRM widget) ===== */
.ub-files { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: flex-start; max-width: 100%; }
.ub-img { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #f4f4f8; line-height: 0; }
.ub-img img { display: block; max-width: 260px; max-height: 220px; width: auto; height: auto; object-fit: contain; }
.ub-img:hover { box-shadow: 0 2px 10px rgba(30,27,46,.15); }
.ub-doc { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); text-decoration: none; font-size: 12.5px; }
.ub-doc b { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: #fff; background: #6366f1; border-radius: 5px; padding: 2px 5px; }
.ub-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ub-doc:hover { border-color: #c7d2fe; background: #f5f7ff; }

/* ===== Read-only view (/chatbot?chat=<id>&view=1 — CRM Chat → History) ===== */
.cb-view .topbar, .cb-view .sidebar, .cb-view .composer, .cb-view .cbar-chev { display: none !important; }
.cb-view .cbar-btn, .cb-view .cart-pill { pointer-events: none; }
.cb-view .rating.ro { pointer-events: none; }
.cb-view .rating.ro .rate-btn:not(.active) { display: none; }
.cb-view .rating.ro:not(:has(.active)) { display: none; }
.cb-view-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.cb-train { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cb-train button { font: inherit; font-size: 12px; padding: 5px 11px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink-soft, #4b5563); }
.cb-train button[data-kind="good"] { border-color: #a7f3d0; color: #047857; background: #f0fdf4; }
.cb-train button:disabled { opacity: .55; cursor: default; }
.cb-train-msg { font-size: 12px; color: var(--muted); }
.cb-train-msg.ok { color: #047857; } .cb-train-msg.err { color: #b91c1c; }
