/* ===== גופן (מאוחסן אצלנו — בלי שירותים חיצוניים) ===== */
@font-face { font-family: Heebo; font-weight: 400; font-display: swap; src: url(/fonts/heebo-hebrew-400-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Heebo; font-weight: 500; font-display: swap; src: url(/fonts/heebo-hebrew-500-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Heebo; font-weight: 700; font-display: swap; src: url(/fonts/heebo-hebrew-700-normal.woff2) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: Heebo; font-weight: 400; font-display: swap; src: url(/fonts/heebo-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Heebo; font-weight: 500; font-display: swap; src: url(/fonts/heebo-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: Heebo; font-weight: 700; font-display: swap; src: url(/fonts/heebo-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  --soft-blue: #3f78cc; /* כחול נעים לכותרות החלונות הנפתחים ולפעולות במערכת */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e6e8ef;
  --line-2: #eef0f5;
  --primary: #4f46e5;
  --primary-600: #4338ca;
  --primary-soft: #eef2ff;
  --ok: #059669;
  --ok-soft: #e7f8f1;
  --warn: #c2410c;
  --warn-soft: #fff4ea;
  --danger: #dc2626;
  --danger-soft: #fdecec;
  --car: #0284c7; --car-soft: #e0f2fe;
  --home: #d97706; --home-soft: #fef3c7;
  --biz: #059669; --biz-soft: #d1fae5;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow: 0 1px 3px rgba(17, 24, 39, .06), 0 4px 16px rgba(17, 24, 39, .04);
  --shadow-lg: 0 24px 64px rgba(17, 24, 39, .22);
  --sidebar: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Heebo, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; font-weight: 700; }
h3 { font-size: .95rem; margin: 0 0 .6rem; font-weight: 700; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .84rem; }
.xs { font-size: .76rem; }
.bold { font-weight: 700; }
.ltr { direction: ltr; unicode-bidi: embed; text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ===== מבנה: סרגל צד + תוכן ===== */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: #0f172a; color: #cbd5e1;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1rem .75rem;
}
.sidebar .brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 700; font-size: 1.02rem; padding: .25rem .5rem 1.1rem; }
.sidebar .brand .logo { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: grid; place-items: center; color: #fff; }
.sidebar nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.sidebar nav a {
  display: flex; align-items: center; gap: .65rem; color: #cbd5e1; padding: .6rem .75rem; border-radius: 10px; font-weight: 500; font-size: .95rem;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(99,102,241,.22); color: #fff; }
.sidebar nav a .count { margin-inline-start: auto; background: #ef4444; color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 .45rem; min-width: 20px; text-align: center; }
.sidebar .me { border-top: 1px solid rgba(255,255,255,.08); padding-top: .8rem; display: flex; align-items: center; gap: .6rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #334155; color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.sidebar .me .who { flex: 1; min-width: 0; }
.sidebar .me .who b { display: block; color: #fff; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me button { background: transparent; border: 0; color: #94a3b8; padding: .35rem; }
.sidebar .me button:hover { color: #fff; background: rgba(255,255,255,.06); }
.content { flex: 1; min-width: 0; }
.demo-banner { background: #fff7ed; color: #9a3412; text-align: center; font-size: .84rem; padding: .4rem 1rem; border-bottom: 1px solid #fed7aa; }
main { max-width: 1500px; margin: 0 auto; padding: 1.5rem 1.75rem 3rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: .15rem; }

.mobilebar { display: none; }
@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .mobilebar {
    display: flex; position: sticky; top: 0; z-index: 20; background: #0f172a; color: #fff; align-items: center; gap: .5rem; padding: .55rem .75rem;
  }
  .mobilebar .brand { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobilebar button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); }
  .tabbar {
    position: fixed; bottom: 0; inset-inline: 0; z-index: 20; background: #fff; border-top: 1px solid var(--line);
    display: flex; justify-content: space-around; padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; color: var(--muted); font-size: .72rem; padding: .2rem .5rem; border-radius: 8px; }
  .tabbar a.active { color: var(--primary); }
  .tabbar a:hover { text-decoration: none; }
  main { padding: 1rem .8rem 5.5rem; }
  h1 { font-size: 1.25rem; }
}
@media (min-width: 901px) { .tabbar { display: none; } }

/* ===== כרטיסים ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem; margin-bottom: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.card-head h2, .card-head h3 { margin: 0; display: flex; align-items: center; gap: .45rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* ===== טפסים וכפתורים ===== */
label, .label { display: block; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; font-weight: 500; }
.field { margin-bottom: .75rem; }
input, select, textarea, button { font: inherit; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: .55rem .75rem; border: 1px solid #d9dce5; border-radius: var(--radius-sm); background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
textarea { resize: vertical; min-height: 72px; }
.code-input { font-size: 1.7rem; letter-spacing: .55rem; text-align: center; direction: ltr; }
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 1px solid #d9dce5; background: #fff; color: var(--text); padding: .5rem .95rem; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 500; font-size: .92rem; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
button:hover, .btn:hover { background: var(--surface-2); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.3); }
.btn-primary:hover { background: var(--primary-600); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #047857; }
.btn-danger { background: #fff; border-color: #f5c2c2; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--line-2); color: var(--text); }
.btn-wa { background: #22c55e; border-color: #22c55e; color: #fff; }
.btn-wa:hover { background: #16a34a; }
.btn-block { width: 100%; }
.btn-sm { padding: .3rem .65rem; font-size: .83rem; }
.btn-icon { padding: .45rem; }

/* ===== תגיות ===== */
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.6; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.chip.plain::before { display: none; }
.st-new { background: #f1f5f9; color: #475569; }
.st-in_progress { background: #e0ecff; color: #1d4ed8; }
.st-quote_sent { background: #f3e8ff; color: #7e22ce; }
.st-renewed { background: var(--ok-soft); color: var(--ok); }
.st-lost { background: var(--danger-soft); color: var(--danger); }
.t-car { background: var(--car-soft); color: var(--car); }
.t-home { background: var(--home-soft); color: var(--home); }
.t-business { background: var(--biz-soft); color: var(--biz); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.type-ico { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; }
.days { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.days.red { color: var(--danger); }
.days.orange { color: var(--warn); }
.days.gray { color: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-inline-start: .35rem; box-shadow: 0 0 0 3px #fee2e2; }
.plate { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fde047; color: #111; border: 1px solid #ca8a04; border-radius: 5px; padding: 0 .4rem; font-size: .82rem; font-weight: 700; direction: ltr; display: inline-block; letter-spacing: .03em; }

/* ===== לוח: מדדים + לשוניות + טבלה ===== */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .95rem; cursor: pointer; text-align: right; display: block; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .1s; }
.kpi:hover { border-color: #c7d2fe; box-shadow: var(--shadow); }
.kpi.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.kpi .k-label { color: var(--muted); font-size: .8rem; font-weight: 500; display: flex; align-items: center; gap: .35rem; }
.kpi .k-val { font-size: 1.5rem; font-weight: 700; margin-top: .1rem; font-variant-numeric: tabular-nums; }
.kpi .k-bar { height: 3px; border-radius: 3px; margin-top: .45rem; background: var(--line-2); overflow: hidden; }
.kpi .k-bar span { display: block; height: 100%; border-radius: 3px; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(2, 1fr); } .kpi .k-val { font-size: 1.25rem; } }

.tabs { display: flex; gap: .35rem; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 500; cursor: pointer; }
.tab .n { background: var(--line-2); color: var(--muted); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; font-weight: 700; }
.tab.active { background: #111827; color: #fff; border-color: #111827; }
.tab.active .n { background: rgba(255,255,255,.18); color: #fff; }

.toolbar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; min-width: 220px; }
.search input { padding-inline-start: 2.3rem; }
.search .icon { position: absolute; inset-inline-start: .75rem; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar select { width: auto; min-width: 140px; }

.table-wrap { overflow: auto; max-height: calc(100vh - 330px); min-height: 240px; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.grid th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: right; font-size: .76rem; color: var(--muted); font-weight: 600;
  padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
table.grid th.sortable { cursor: pointer; }
table.grid th.sortable:hover { color: var(--text); }
table.grid th .arrow { opacity: .35; margin-inline-start: .2rem; font-size: .7rem; }
table.grid th.sorted .arrow { opacity: 1; color: var(--primary); }
table.grid tr.filters th { top: 33px; background: #fff; padding: .35rem .3rem; z-index: 2; }
table.grid tr.filters input, table.grid tr.filters select { padding: .3rem .45rem; font-size: .8rem; border-radius: 7px; min-width: 70px; }
table.grid td { padding: .6rem .6rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; white-space: nowrap; }
table.grid tbody tr { cursor: pointer; transition: background .1s; }
table.grid tbody tr:hover td { background: #f7f8ff; }
table.grid td.name { font-weight: 600; white-space: normal; min-width: 150px; }
table.grid td.wrap { white-space: normal; min-width: 120px; max-width: 220px; }
.table-foot { display: flex; justify-content: space-between; align-items: center; padding: .6rem 1rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); flex-wrap: wrap; gap: .5rem; }
.cards { display: none; padding: .6rem; }
.item-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem; margin-bottom: .55rem; color: inherit; cursor: pointer; box-shadow: var(--shadow-sm); }
.item-card:hover { text-decoration: none; border-color: #c7d2fe; }
.item-card .top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.item-card .name { font-weight: 700; }
.item-card .meta { color: var(--muted); font-size: .84rem; margin: .25rem 0 .4rem; }
@media (max-width: 900px) {
  .table-wrap.responsive { display: none; }
  .cards { display: block; }
}
.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty .big { font-size: 2rem; }
.banner { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; flex-wrap: wrap; }
.banner.info { background: var(--primary-soft); border-color: #c7d2fe; color: #3730a3; }
.banner.warn { background: var(--warn-soft); border-color: #fed7aa; color: #9a3412; }
.banner .grow { min-width: 200px; }

/* ===== חלון חידוש (90% מהמסך) ===== */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100vw - 2rem)); box-shadow: var(--shadow-lg); color: var(--text); }
dialog::backdrop { background: rgba(15, 23, 42, .5); backdrop-filter: blur(2px); }
dialog .dlg-body { padding: 1.25rem; max-height: 75vh; overflow-y: auto; }
dialog .dlg-actions { display: flex; gap: .5rem; justify-content: flex-start; padding: .85rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-2); }
dialog.xl { width: 90vw; height: 90vh; max-width: 90vw; max-height: 90vh; background: var(--bg); overflow: hidden; }
dialog.xl[open] { display: flex; flex-direction: column; }
@media (max-width: 900px) { dialog.xl { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border-radius: 0; margin: 0; } }
.rv-head { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.25rem; padding-inline-end: 4.2rem; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; }
/* כפתור סגירה של חלון החידוש — פינה שמאלית עליונה, בולט */
.rv-close { position: absolute; top: .7rem; left: .8rem; width: 2.6rem; height: 2.6rem; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #1f2937; color: #fff; border: 2px solid #1f2937; box-shadow: 0 2px 8px rgba(15, 23, 42, .25); z-index: 2; }
.rv-close:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.rv-close:focus-visible { outline: 3px solid #fca5a5; outline-offset: 2px; }
.rv-close .icon, .rv-close .icon.lg { width: 1.35rem; height: 1.35rem; stroke-width: 2.6; }
.rv-head .title { flex: 1; min-width: 200px; }
.rv-head .title h2 { margin: 0; font-size: 1.2rem; }
.rv-head .title .sub { color: var(--muted); font-size: .85rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.rv-head select { width: auto; }
.rv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(300px, 1.1fr) minmax(320px, 1.25fr) minmax(280px, .9fr); gap: 1rem; padding: 1rem 1.25rem; overflow: hidden; }
.rv-col { overflow-y: auto; min-height: 0; padding-inline-end: 2px; }
.rv-col .card { margin-bottom: .85rem; }
.rv-chat { display: flex; flex-direction: column; min-height: 0; }
.rv-chat .card { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 0; }
.rv-tabs { display: none; }
@media (max-width: 1200px) and (min-width: 901px) { .rv-body { grid-template-columns: 1fr 1.2fr; } .rv-col.actions { grid-column: 1 / -1; } .rv-body { overflow-y: auto; } .rv-col { overflow: visible; } }
@media (max-width: 900px) {
  .rv-tabs { display: flex; gap: .25rem; padding: .5rem .75rem; background: #fff; border-bottom: 1px solid var(--line); }
  .rv-tabs button { flex: 1; border-radius: 8px; }
  .rv-tabs button.active { background: #111827; color: #fff; border-color: #111827; }
  .rv-body { display: block; padding: .75rem; overflow-y: auto; }
  .rv-col { display: none; overflow: visible; }
  .rv-col.show { display: block; }
  .rv-chat.show { display: flex; height: 100%; }
  .rv-head { padding: .7rem .8rem; }
}
.kv { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: .45rem .9rem; font-size: .9rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .82rem; padding-top: .05rem; }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.kv dd.empty-val { color: var(--faint); font-weight: 400; }
.sec-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; margin: 0 0 .7rem; }
.phones { display: flex; flex-direction: column; gap: .35rem; }
.phone-row { display: flex; align-items: center; gap: .5rem; }
.phone-row .t { color: var(--muted); font-size: .78rem; min-width: 38px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.mini-table td, .mini-table th { padding: .3rem .35rem; border-bottom: 1px solid var(--line-2); text-align: right; }
.mini-table th { color: var(--muted); font-weight: 600; }

/* ===== ציר זמן / צ'אט ===== */
.timeline { display: flex; flex-direction: column; gap: .55rem; flex: 1; min-height: 160px; overflow-y: auto; padding: .4rem .15rem; }
.msg { max-width: 85%; padding: .6rem .85rem; border-radius: 16px; white-space: pre-wrap; word-break: break-word; font-size: .93rem; box-shadow: var(--shadow-sm); }
.msg .meta { font-size: .72rem; color: var(--muted); margin-top: .3rem; }
.msg.me { align-self: flex-start; background: var(--primary); color: #fff; border-start-start-radius: 5px; }
.msg.me .meta { color: rgba(255,255,255,.75); }
.msg.me a { color: #fff; text-decoration: underline; }
.msg.them { align-self: flex-end; background: #fff; border: 1px solid var(--line); border-start-end-radius: 5px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: .78rem; text-align: center; max-width: 95%; box-shadow: none; padding: .15rem .5rem; }
.msg.system .meta { display: inline; margin-inline-start: .4rem; }
.msg.internal { align-self: stretch; max-width: 100%; background: #fffbeb; border: 1px dashed #fcd34d; color: #78350f; box-shadow: none; text-align: right; font-size: .85rem; border-radius: 10px; }
.msg.approval, .msg.me.approval { align-self: center; background: var(--ok-soft); color: var(--ok); font-weight: 700; text-align: center; border: 1px solid #a7f3d0; }
.msg.approval .meta { color: var(--ok); opacity: .8; }
.msg.quote { box-shadow: 0 0 0 2px #c4b5fd; }
.msg .file { display: inline-flex; gap: .3rem; align-items: center; margin-top: .35rem; font-weight: 600; }
.composer { display: flex; gap: .5rem; align-items: flex-end; margin-top: .75rem; }
.composer textarea { min-height: 48px; max-height: 160px; }
.composer-tools { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.actions { display: flex; flex-direction: column; gap: .5rem; }
.linkbox { font-size: .76rem; direction: ltr; background: var(--surface-2); border: 1px solid var(--line); padding: .45rem .55rem; border-radius: 8px; word-break: break-all; color: var(--muted); margin-bottom: .6rem; }
.warn-box { background: var(--warn-soft); border: 1px solid #fed7aa; color: #9a3412; padding: .6rem .8rem; border-radius: 10px; margin-bottom: .75rem; font-size: .88rem; }
.ok-box { background: var(--ok-soft); border: 1px solid #a7f3d0; color: #065f46; padding: .6rem .8rem; border-radius: 10px; margin-bottom: .75rem; }
.err-box { background: var(--danger-soft); border: 1px solid #fecaca; color: #991b1b; padding: .6rem .8rem; border-radius: 10px; margin-bottom: .75rem; }
.call-item { border-bottom: 1px solid var(--line-2); padding: .45rem 0; font-size: .84rem; }
.call-item:last-child { border-bottom: 0; }

/* ===== ייבוא ===== */
.dropzone { border: 2px dashed #c7d2fe; background: var(--primary-soft); border-radius: var(--radius); padding: 2rem 1rem; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; position: relative; }
.dropzone:hover, .dropzone.over { background: #e0e7ff; border-color: var(--primary); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .big { font-size: 2.2rem; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .6rem; margin: .75rem 0; }
.stat-tile { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; }
.stat-tile b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.stat-tile span { color: var(--muted); font-size: .8rem; }

/* ===== הודעה קופצת ===== */
.toast { position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: .65rem 1.1rem; border-radius: 12px; z-index: 1000; box-shadow: var(--shadow-lg); max-width: 90vw; font-weight: 500; }
.toast.error { background: var(--danger); }
@media (max-width: 900px) { .toast { bottom: 5rem; } }

/* ===== כניסה ===== */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(1200px 600px at 80% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #cffafe 0%, transparent 55%), var(--bg); }
.login-wrap { width: min(410px, 100%); }
.login-wrap .logo { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(135deg, #6366f1, #22d3ee); display: grid; place-items: center; color: #fff; margin: 0 auto 1rem; box-shadow: 0 10px 30px rgba(99,102,241,.35); }
.login-wrap .card { padding: 1.6rem; box-shadow: var(--shadow); }
.login-wrap h1 { text-align: center; margin-bottom: .3rem; }
.login-wrap .lead { text-align: center; color: var(--muted); margin: 0 0 1.25rem; }
.demo-code { background: #fff7ed; border: 1px dashed #fdba74; padding: .7rem; border-radius: 12px; text-align: center; margin-bottom: .9rem; }
.demo-code b { font-size: 1.45rem; letter-spacing: .3rem; direction: ltr; display: inline-block; }

/* ===== פורטל לקוח ===== */
.portal-head { background: linear-gradient(135deg, #312e81, #4f46e5 60%, #0891b2); color: #fff; padding: 1.4rem 1rem 3.2rem; text-align: center; }
.portal-head .agency { font-weight: 700; font-size: 1.2rem; }
.portal main { max-width: 720px; margin-top: -2.2rem; padding-top: 0; }
.approve-box { text-align: center; }
.check-row { display: flex; gap: .55rem; align-items: flex-start; text-align: right; margin: .75rem 0; }
.check-row input { margin-top: .3rem; width: 20px; height: 20px; flex: none; accent-color: var(--ok); }
.portal .timeline { max-height: 55vh; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.spinner { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.scroll-x { overflow-x: auto; }

/* ===== בחירת מטפל, חודש ===== */
select.agent-inline { width: auto; min-width: 130px; padding: .25rem .5rem; font-size: .82rem; border-radius: 8px; background-color: var(--surface-2); }
.month-select { font-weight: 700; min-width: 190px; }
.head-field { display: flex; flex-direction: column; gap: .1rem; margin: 0; }
.head-field select { width: auto; min-width: 150px; }

/* ===== טופס הצעת חידוש (נציג) ===== */
dialog:has(.offer-form) { width: min(780px, calc(100vw - 1rem)); }
.offer-form .sec-title { margin-top: .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--line-2); }
.offer-form .span2 { grid-column: 1 / -1; }
.check-pills { display: flex; flex-wrap: wrap; gap: .4rem; }
.check-pill { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .7rem; font-size: .85rem; color: var(--text); cursor: pointer; margin: 0; background: #fff; }
.check-pill:has(input:checked) { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary-600); }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: end; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .75rem 0; margin-bottom: .6rem; }
.price-row .bold { display: block; font-size: .8rem; margin-bottom: .25rem; }
.offer-card .offer-mini { margin-bottom: .35rem; }
.offer-card .row.between { padding: .2rem 0; }
.offer-card .grid2 { margin: .6rem 0; gap: .5rem; }

/* ===== הצעה אצל הלקוח (נייד) ===== */
.card.offer { border: 2px solid #c7d2fe; box-shadow: var(--shadow); }
.offer-head { text-align: center; padding-bottom: .8rem; margin-bottom: .8rem; border-bottom: 1px dashed var(--line); }
.offer-insurer { font-size: 1.5rem; font-weight: 700; color: var(--primary-600); }
.offer-note { background: var(--surface-2); border-radius: 10px; padding: .55rem .7rem; }
.offer-prices { margin: 1rem 0; display: flex; flex-direction: column; gap: .6rem; }
.price-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; }
.price-block label { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: .45rem 0 0; }
.price-block select { width: auto; min-width: 150px; }
.price-line { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.price-line.total { border-top: 1px solid var(--line); padding-top: .5rem; font-size: 1.05rem; }
.big-price { font-size: 1.25rem; }
.pay-box { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .6rem; display: flex; flex-direction: column; gap: .45rem; }
.pay-box label.row { justify-content: space-between; margin: 0; color: var(--text); }
input.last4 { width: 96px; text-align: center; letter-spacing: .4rem; font-size: 1.15rem; direction: ltr; }
@media (max-width: 600px) {
  .kpis { grid-template-columns: repeat(3, 1fr); gap: .45rem; }
  .kpi { padding: .5rem .6rem; }
  .kpi .k-val { font-size: 1.1rem; }
  .kpi .k-label { font-size: .72rem; }
  .kpi .xs { display: none; }
  .page-head .row .btn, .page-head .row button { padding: .4rem .7rem; font-size: .85rem; }
}

/* ===== התראות ===== */
@keyframes blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.8); } }
.dot.pulse { animation: blink 1.1s ease-in-out infinite; }
.dot.green { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
td.name .dot { margin-inline-start: 0; margin-inline-end: .4rem; }
.item-card .name .dot { margin-inline-start: 0; margin-inline-end: .35rem; }
.sidebar nav a .count.pulse, .tabbar a .count.pulse { animation: blink 1.1s ease-in-out infinite; }
.tabbar a { position: relative; }
.tabbar a .count { position: absolute; top: 0; inset-inline-end: .3rem; background: #ef4444; color: #fff; border-radius: 999px; font-size: .65rem; padding: 0 .35rem; }
.banner.alert { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.banner.ok { background: var(--ok-soft); border-color: #a7f3d0; color: #065f46; }
.banner .row.grow { gap: .4rem; }
.alert-chip { border-color: #fca5a5; }
td.name .chip { margin-inline-start: .4rem; }
/* "חזרו אליי" בפורטל */
.callback-row { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; font-size: .92rem; color: var(--text); }
.callback-row input { width: 20px; height: 20px; accent-color: var(--warn); }

/* ===== סימון אדום / ירוק על שורת הלקוח ===== */
.mark { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; margin-inline-end: .45rem; }
.mark.red { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
.mark.green { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.mark.pulse { animation: blink 1.1s ease-in-out infinite; }
table.grid tbody tr.mark-unread td { background: #fff5f5; }
table.grid tbody tr.mark-unread td:first-child { box-shadow: inset -4px 0 0 #ef4444; }
table.grid tbody tr.mark-approved td { background: #f0fdf6; }
table.grid tbody tr.mark-approved td:first-child { box-shadow: inset -4px 0 0 #10b981; }
table.grid tbody tr.mark-unread:hover td { background: #ffecec; }
table.grid tbody tr.mark-approved:hover td { background: #e3faee; }
.item-card.mark-unread { border-color: #fca5a5; background: #fff5f5; border-inline-start: 4px solid #ef4444; }
.item-card.mark-approved { border-color: #a7f3d0; background: #f0fdf6; border-inline-start: 4px solid #10b981; }
td.name .mark { margin-inline-end: .45rem; }
/* סימנים למעלה — רק נקודה ומספר */
.alert-btns { display: flex; gap: .5rem; align-items: center; margin-inline-start: .75rem; }
.alert-btn { border-radius: 999px; padding: .35rem .75rem; gap: .45rem; font-size: 1rem; }
.alert-btn .mark { margin: 0; }
.alert-btn.red { border-color: #fecaca; background: #fff5f5; color: #b91c1c; }
.alert-btn.green { border-color: #a7f3d0; background: #f0fdf6; color: #047857; }
.alert-btn.active.red { background: #ef4444; color: #fff; border-color: #ef4444; }
.alert-btn.active.green { background: #10b981; color: #fff; border-color: #10b981; }
.alert-btn.active .mark { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }

/* ===== חלון חידוש: שלושה מקטעים ברורים ===== */
.rv-body { grid-template-columns: minmax(300px, 1fr) minmax(300px, .95fr) minmax(340px, 1.15fr); gap: .9rem; }
.rv-section { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; overflow: hidden; min-height: 0; padding: 0; }
.rv-section-head { display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); border-top: 4px solid var(--sec); background: var(--sec-soft); flex: none; }
.rv-section-head .sec-num { width: 26px; height: 26px; border-radius: 50%; background: var(--sec); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex: none; }
.rv-section-head .sec-name { font-weight: 700; font-size: 1rem; color: var(--text); }
.rv-section-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 1rem .9rem; }
.s-details { --sec: #0ea5e9; --sec-soft: #f0f9ff; }
.s-offer { --sec: #7c3aed; --sec-soft: #f5f3ff; }
.s-docs { --sec: #f59e0b; --sec-soft: #fffbeb; }
.s-docs .rv-section-body { display: flex; flex-direction: column; padding-bottom: .6rem; }
.sub-block { padding: .9rem 0; border-bottom: 1px solid var(--line-2); }
.sub-block:last-child { border-bottom: 0; }
.sub-block .card-head { margin-bottom: .55rem; }
.sub-block .card-head h3 { font-size: .9rem; color: #374151; }
.sub-block .kv { font-size: .88rem; gap: .35rem .8rem; }
.more-box { margin-top: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.more-box > summary { cursor: pointer; padding: .55rem .8rem; font-weight: 600; font-size: .85rem; color: var(--muted); list-style: none; }
.more-box > summary::before { content: '▸ '; }
.more-box[open] > summary::before { content: '▾ '; }
.more-box > *:not(summary) { padding: 0 .8rem .7rem; }
.more-item { padding-top: .5rem; }
.chat-block { display: flex; flex-direction: column; flex: 1; min-height: 260px; padding-top: .9rem; }
.chat-block .timeline { flex: 1; min-height: 160px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: .6rem; }
.calls-box { flex: none; margin-top: .7rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.calls-box > summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: #374151; display: flex; align-items: center; gap: .35rem; padding: .3rem 0; list-style: none; }
.calls-box > summary::after { content: '▾'; margin-inline-start: auto; color: var(--faint); }
.calls-box:not([open]) > summary::after { content: '▸'; }
.calls-box .more-box { background: #fff; }
.offer-card .ok-box { margin-top: .5rem; }
@media (max-width: 1200px) and (min-width: 901px) {
  .rv-body { grid-template-columns: 1fr 1fr; overflow-y: auto; }
  .rv-section.s-docs { grid-column: 1 / -1; min-height: 520px; }
  .rv-section { overflow: visible; }
  .rv-section-body { overflow: visible; }
}
@media (max-width: 900px) {
  .rv-col.rv-section { display: none; }
  .rv-col.rv-section.show { display: flex; min-height: 100%; }
  .rv-section-body { overflow: visible; }
  .s-docs.show .rv-section-body { min-height: calc(100dvh - 210px); }
}
@media (max-width: 1200px) and (min-width: 901px) {
  .rv-section-body { flex: 1 0 auto; }
  .rv-section.s-details, .rv-section.s-offer { max-height: none; }
}
@media (max-width: 900px) {
  .rv-section-body { flex: 1 0 auto; }
  .rv-head { padding-inline-end: 3.4rem; gap: .5rem; }
  .rv-close { top: .5rem; left: .5rem; width: 2.3rem; height: 2.3rem; }
  .rv-head .title { flex-basis: 100%; }
  .rv-head .head-field { flex: 1 1 40%; min-width: 0; }
  .rv-head .head-field select { min-width: 0; width: 100%; padding: .35rem .5rem; }
  .rv-head .type-ico { display: none; }
}
@media (max-width: 1200px) and (min-width: 901px) {
  .rv-body { grid-auto-rows: max-content; align-content: start; }
  .rv-body .rv-section { min-height: auto; }
}

/* ===== הערות לקוח, פוליסה שהופקה, חברת הביטוח ===== */
.notes-btn { position: relative; }
.notes-btn.has { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.notes-dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; display: inline-block; }
.doc-list { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .6rem; }
.doc-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface-2); }
.check-line { display: flex; align-items: center; gap: .4rem; margin: .5rem 0; color: var(--text); }
.uw-line { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; padding: .35rem 0 .5rem; }
.insurer-item { background: #f8fafc; border: 1px solid var(--line-2); border-radius: 10px; padding: .5rem .65rem; margin-top: .45rem; }
.pre { white-space: pre-wrap; word-break: break-word; }
.calls-box .row { margin-bottom: .3rem; }
/* טופס הצעה: שורת מחיר עם ריבית */
.price-row { grid-template-columns: 1fr 1fr 1fr 1fr; }
.price-row .price-note { grid-column: 1 / -1; padding-bottom: .55rem; }
.price-row.single { grid-template-columns: 1fr 2fr; align-items: center; }
.price-row.single .price-note { grid-column: auto; padding: 0; }
@media (max-width: 700px) { .price-row { grid-template-columns: 1fr 1fr; } .price-row.single { grid-template-columns: 1fr; } }
dialog.unsaved { width: min(420px, calc(100vw - 2rem)); }
input.license-input { width: 120px; text-align: center; direction: ltr; font-size: 1.1rem; letter-spacing: .1rem; }
.card.policy-docs { border: 2px solid #a7f3d0; }
.card.policy-docs .doc-row { padding: .55rem .7rem; }
/* מקטע תיעוד: הצ'אט בגובה קבוע, והשאר נגלל מתחתיו */
@media (min-width: 901px) {
  .s-docs .chat-block { flex: 0 0 auto; height: min(470px, 58vh); }
}
.insurer-item .pre { max-height: 7.5em; overflow-y: auto; }

/* ===== סטטוסים חדשים ===== */
.st-approved { background: #ccfbf1; color: #0f766e; }
.st-not_approved { background: #fef3c7; color: #b45309; }
.st-quote_sent { background: #e0ecff; color: #1d4ed8; }
.kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.wa-mini { padding: .2rem .4rem; margin-inline-start: .3rem; vertical-align: middle; }
.disabled-look { opacity: .55; }
/* מסמכים נדרשים + תנאי "מחודש" */
.doc-row.req { align-items: flex-start; }
.doc-row.req.ok { background: var(--ok-soft); border-color: #a7f3d0; }
.req-mark { font-weight: 700; color: var(--muted); width: 1.1rem; text-align: center; }
.doc-row.req.ok .req-mark { color: var(--ok); }
.req-row { display: grid; grid-template-columns: minmax(180px, 1fr) 1.4fr; gap: .5rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line-2); }
@media (max-width: 600px) { .req-row { grid-template-columns: 1fr; } }
.ready-list { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .6rem; font-size: .85rem; }
.ready-item { display: flex; gap: .45rem; color: var(--muted); }
.ready-item.ok { color: var(--ok); font-weight: 600; }
/* פורטל: כפתור שיחה + מסמכים נדרשים */
.chat-toggle { margin-bottom: 1rem; padding: .8rem; font-size: 1rem; font-weight: 700; background: #fff; border: 2px solid #c7d2fe; color: var(--primary-600); border-radius: 14px; }
.chat-toggle.open { background: var(--primary-soft); }
.card.req-card { border: 2px solid #fcd34d; }
.portal .doc-row { flex-wrap: wrap; }
.del-btn { color: var(--danger); font-size: 1rem; }
.del-btn:hover { background: var(--danger-soft); }
/* מחיקה בלוח — עמודה צרה בסוף השורה, עמומה עד שעוברים על השורה */
.board-grid td.del-cell { width: 1%; padding-inline: .15rem; }
.board-grid td.del-cell .del-btn { opacity: .35; padding: .15rem .35rem; }
.board-grid tr:hover td.del-cell .del-btn, .board-grid td.del-cell .del-btn:focus-visible { opacity: 1; }
@media (hover: none) { .board-grid td.del-cell .del-btn { opacity: .8; } }
.dropzone + .field, .banner.info { margin-top: .5rem; }
.price-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) { .price-row.three { grid-template-columns: 1fr 1fr; } }

/* ===== בלי גלילה הצידה בכל המסכים ===== */
html, body { overflow-x: hidden; }
main, .content { min-width: 0; max-width: 100%; }
.table-wrap { overflow-x: hidden; }
.scroll-x { overflow-x: hidden; }
table.grid { table-layout: auto; }
table.grid th { white-space: normal; padding: .45rem .4rem; }
table.grid td { white-space: normal; padding: .5rem .4rem; font-size: .86rem; word-break: break-word; }
table.grid td.name { min-width: 110px; }
table.grid .plate { font-size: .74rem; padding: 0 .3rem; }
table.grid .chip { font-size: .72rem; padding: .1rem .45rem; }
select.agent-inline { min-width: 0; width: 100%; max-width: 120px; font-size: .78rem; padding: .2rem .3rem; }
table.grid tr.filters input, table.grid tr.filters select { min-width: 0; width: 100%; }
.toolbar select { min-width: 0; }
.rv-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); }
.kv dd { min-width: 0; }

/* ===== מקטע 2: ההצעה כפי שהלקוח רואה ===== */
.offer-status { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .8rem; border-radius: 12px; margin-bottom: .6rem; font-size: .95rem; }
.offer-status.ok { background: #059669; color: #fff; }
.offer-status.bad { background: #dc2626; color: #fff; }
.offer-status.wait { background: #f5f3ff; color: #5b21b6; border: 1px solid #ddd6fe; }
.offer-preview { border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; background: #fff; }
.op-head { text-align: center; border-bottom: 1px dashed var(--line); padding-bottom: .45rem; margin-bottom: .5rem; }
.op-insurer { font-size: 1.15rem; font-weight: 700; color: var(--primary-600); }
.kv.compact { grid-template-columns: minmax(80px, auto) 1fr; gap: .2rem .6rem; font-size: .82rem; }
.kv.compact dt { font-size: .76rem; }
.op-prices { margin-top: .55rem; border-top: 1px solid var(--line-2); padding-top: .45rem; display: flex; flex-direction: column; gap: .3rem; }
.op-price { display: flex; align-items: baseline; gap: .5rem; }
.op-choice { margin-top: .35rem; }
.op-actions { display: flex; gap: .35rem; margin-top: .6rem; flex-wrap: wrap; }
.icon-btn { flex-direction: column; gap: .1rem; padding: .35rem .55rem; min-width: 58px; font-size: .7rem; border-radius: 10px; }
.icon-btn span { font-size: .7rem; color: var(--muted); }
.icon-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.icon-btn.primary span { color: #fff; }
.icon-btn.wa { color: #16a34a; border-color: #bbf7d0; }
.completion { border: 1px solid var(--line); border-radius: 12px; padding: 0 .75rem; margin-top: .75rem; }
.completion.hot { border: 2px solid #34d399; background: #f0fdf6; }
.completion-head { display: flex; align-items: center; gap: .4rem; font-weight: 700; padding: .6rem 0 .1rem; font-size: .92rem; }
.completion .sub-block { padding: .65rem 0; }
.req-tpl { display: flex; align-items: center; gap: .4rem; grid-column: 1 / -1; }

/* ===== מקטע 3: גלילה רק בשיחה + התהליך בקטן ===== */
.stepper { display: flex; flex-wrap: wrap; gap: .25rem; padding: .7rem 0 .2rem; }
.step { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .1rem .5rem .1rem .2rem; }
.step i { font-style: normal; width: 16px; height: 16px; border-radius: 50%; background: #e5e7eb; color: #6b7280; display: grid; place-items: center; font-size: .62rem; font-weight: 700; }
.step.ok { color: var(--ok); background: var(--ok-soft); border-color: #a7f3d0; }
.step.ok i { background: var(--ok); color: #fff; }
.step.cur { color: var(--primary-600); border-color: #c7d2fe; background: var(--primary-soft); font-weight: 700; }
.step.cur i { background: var(--primary); color: #fff; }
@media (min-width: 1201px) {
  .s-docs .rv-section-body { overflow: hidden; }
  .s-docs .chat-block { flex: 1 1 auto; height: auto; min-height: 0; }
  .s-docs .chat-block .timeline { min-height: 0; }
  .s-docs .calls-box > *:not(summary) { max-height: 26vh; overflow-y: auto; }
  .s-docs .calls-box[open] { max-height: 34vh; overflow-y: auto; }
}
@media (max-width: 1200px) { .s-docs .chat-block .timeline { max-height: 50vh; } }

/* ===== פורטל: מחיר מלא משתנה + טופס להורדה ===== */
.full-price { margin-top: .45rem; font-size: .9rem; font-weight: 600; color: var(--text); background: #fff; border: 1px dashed var(--line); border-radius: 8px; padding: .35rem .55rem; }
.full-price.with-interest { border-color: #fcd34d; background: #fffbeb; }
.tpl-btn { margin-top: .35rem; }

/* ===== סטטוס בראש החלון בצבע ===== */
select.status-select { font-weight: 700; }
select.status-select.st-approved { background: #059669; color: #fff; border-color: #059669; }
select.status-select.st-renewed { background: #047857; color: #fff; border-color: #047857; }
select.status-select.st-not_approved, select.status-select.st-lost { background: #dc2626; color: #fff; border-color: #dc2626; }
select.status-select.st-in_progress { background: #e0ecff; color: #1d4ed8; border-color: #bfdbfe; }
select.status-select option { background: #fff; color: var(--text); }

/* ===== חלונות נפתחים במקטע 2 (לבן, פשוט) ===== */
details.fold { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-top: .7rem; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .45rem; padding: .65rem .8rem; font-weight: 700; font-size: .92rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '▾'; margin-inline-start: auto; color: var(--faint); }
details.fold:not([open]) > summary::after { content: '▸'; }
details.fold > summary .chip, details.fold > summary .xs { font-weight: 500; }
.fold-body { padding: 0 .8rem .75rem; }
.fold-body .offer-preview { border: 0; padding: 0; }
.fold-body .sub-block { padding: .6rem 0; }
.fold-body .sub-block .card-head h3 { font-size: .85rem; }
.approved-line { color: var(--ok); font-weight: 600; margin-bottom: .4rem; }
.upload-line { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.upload-line select { width: auto; flex: 1; min-width: 120px; padding: .3rem .5rem; font-size: .82rem; }
.upload-line .btn { padding: .3rem .6rem; font-size: .8rem; }

/* ===== מקטע תיעוד: מלל קטן וברור ===== */
.s-docs .msg { font-size: .8rem; padding: .4rem .6rem; border-radius: 12px; line-height: 1.4; }
.s-docs .msg .meta { font-size: .64rem; margin-top: .15rem; }
.s-docs .msg.system { font-size: .68rem; padding: .05rem .4rem; }
.s-docs .msg.internal { font-size: .74rem; }
.s-docs .msg .xs { font-size: .64rem; }
.s-docs .timeline { gap: .35rem; }
.s-docs .chat-block .card-head h3, .s-docs .calls-box > summary { font-size: .8rem; }
.s-docs .call-item, .s-docs .insurer-item, .s-docs .uw-line { font-size: .74rem; }
.s-docs .composer textarea { font-size: .82rem; min-height: 40px; }
.s-docs .composer button, .s-docs .composer-tools .btn { font-size: .78rem; padding: .3rem .6rem; }

/* ===== תיעוד: פעולות במערכת (כחול נייבי) + שיחה מלל בלבד ===== */
.actions-log { background: var(--soft-blue); border-radius: 10px; padding: .35rem .5rem; max-height: 24vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.act-line { display: flex; gap: .5rem; align-items: baseline; color: #fff; font-size: .72rem; line-height: 1.45; padding: .12rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.act-line:last-child { border-bottom: 0; }
.act-time { flex: none; opacity: .65; font-variant-numeric: tabular-nums; }
.act-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.act-file { color: #c7d2fe; flex: none; }
.s-docs details.fold > summary { font-size: .8rem; padding: .5rem .7rem; }
.s-docs .chat-block { min-height: 0; padding-top: 0; height: auto !important; flex: none !important; }
.s-docs .chat-block .timeline { height: 34vh; max-height: none; min-height: 140px; flex: none; }
@media (min-width: 1201px) { .s-docs .rv-section-body { overflow-y: auto; } }

/* דרישות שיעבוד / מיגון */
.need-box { display: grid; gap: .3rem; margin-top: .6rem; padding: .5rem .6rem; border: 1px dashed #fbbf24; border-radius: 10px; background: #fffbeb; }
.need-line { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .85rem; }
.need-line.ok { color: var(--ok); }
.need-line input { width: 17px; height: 17px; accent-color: var(--ok); }
.need-edit { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; margin-top: .35rem; }
.need-edit input[type=checkbox] { width: 18px; height: 18px; }
.need-edit input[type=date] { width: auto; }
.op-reqs { margin-top: .5rem; display: grid; gap: .25rem; }
.op-req { font-size: .78rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: .3rem .5rem; }

/* בועה אדומה אחרי העלאת מסמך */
.doc-warn { position: fixed; top: 18%; left: 50%; transform: translateX(-50%); z-index: 1000; background: #dc2626; color: #fff; font-weight: 700; padding: .9rem 1.3rem; border-radius: 14px; box-shadow: 0 12px 34px rgba(220,38,38,.35); max-width: calc(100vw - 2rem); text-align: center; animation: warnIn .2s ease-out; }
@keyframes warnIn { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* כפתורי שליחה כסמל בלבד */
.btn-icon-send { padding: .5rem .75rem; min-width: 48px; }
.btn-mail { background: #ea4335; border-color: #ea4335; color: #fff; }
.btn-mail:hover { background: #c5221f; }
.icon-btn.mail { color: #ea4335; }
.icon-btn.wa { color: #16a34a; }

/* שחור מהבהב: בדיקת מיגון מתקרבת */
.mark.black { background: #111827; box-shadow: 0 0 0 3px #d1d5db; }
table.grid tbody tr.mark-protect td:first-child { box-shadow: inset -4px 0 0 #111827; }
.item-card.mark-protect { border-inline-start: 4px solid #111827; }
.req-notes { display: grid; gap: .45rem; margin: .7rem 0; }
.req-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: .55rem .75rem; }

/* ===== טופס הצעת חידוש קומפקטי — מסך אחד, בלי גלילה ===== */
dialog:has(.offer-form) { width: min(700px, calc(100vw - 1rem)); }
dialog:has(.offer-form) .dlg-body { padding: .7rem .9rem .5rem; max-height: none; overflow: visible; }
dialog:has(.offer-form) .dlg-body > h2 { font-size: 1rem; margin: 0 0 .3rem; }
dialog:has(.offer-form) .dlg-actions { padding: .5rem .9rem; }
.offer-form .sec-title { font-size: .76rem; margin: .35rem 0 .3rem; padding-bottom: .2rem; }
.offer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem .5rem; }
.offer-grid .w2 { grid-column: span 2; }
.offer-grid .w4 { grid-column: 1 / -1; }
.offer-form .field { margin-bottom: 0; min-width: 0; }
.offer-form .field > label, .offer-form .price-row .bold { font-size: .66rem; margin-bottom: .1rem; color: var(--muted); font-weight: 600; display: block; }
.offer-form input[type=text], .offer-form input[type=number], .offer-form input[type=date], .offer-form select {
  height: 30px; padding: .15rem .45rem; font-size: .8rem; border-radius: 8px; min-width: 0; width: 100%; }
.offer-form .check-pill { padding: .15rem .5rem; font-size: .74rem; }
.prot-line { display: flex; gap: .35rem; align-items: center; }
.prot-line > input[type=text] { flex: 1 1 auto; }
.need-chk { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; white-space: nowrap; margin: 0; cursor: pointer; }
.need-chk input { width: 16px; height: 16px; flex: none; }
.need-date { display: inline-flex; align-items: center; gap: .25rem; font-size: .7rem; color: var(--muted); margin: 0; }
.need-date input[type=date] { width: 118px; flex: none; }
.lien-chk { height: 30px; font-weight: 500; }
.offer-form .price-row { padding: .35rem .5rem; margin-bottom: .3rem; gap: .3rem .5rem; border-radius: 10px; align-items: end; }
.offer-form .price-row.three { grid-template-columns: 1fr 1fr 1fr 1.3fr; }
.offer-form .price-row.three .price-note { grid-column: auto; padding: 0 0 .45rem; }
.offer-form .price-row.single { grid-template-columns: 1fr 3fr; }
.offer-form .price-note { font-size: .68rem; }
@media (max-width: 700px) {
  .offer-grid { grid-template-columns: 1fr 1fr; }
  .offer-grid .w2 { grid-column: 1 / -1; }
  .offer-form .price-row.three { grid-template-columns: 1fr 1fr; }
  .offer-form .price-row.three .price-note { grid-column: 1 / -1; }
  dialog:has(.offer-form) .dlg-body { max-height: 80vh; overflow-y: auto; }
}

/* בחירת וואטסאפ בסרגל הצד */
.wa-mode { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .5rem .4rem; color: #94a3b8; }
.wa-mode .xs { width: 100%; }
.wa-mode button { font-size: .72rem; padding: .2rem .5rem; border-radius: 8px; background: rgba(255,255,255,.06); color: #cbd5e1; border: 1px solid rgba(255,255,255,.12); }
.wa-mode button.on { background: #22c55e; border-color: #22c55e; color: #fff; }
.last4-mini { letter-spacing: .25rem; text-align: center; }
.card-preset { display: flex; align-items: baseline; gap: .3rem; margin: .3rem 0; }
.card-preset b { font-size: 1.15rem; letter-spacing: .2rem; }

/* ===== חלון החידוש: כל כותרת של חלון נפתח — כחול נייבי עם כתב לבן ===== */
dialog.xl details > summary {
  background: var(--soft-blue); color: #fff; border-radius: 10px; padding: .5rem .75rem;
}
dialog.xl details[open] > summary { border-radius: 10px 10px 0 0; }
dialog.xl details > summary .muted, dialog.xl details > summary .xs, dialog.xl details > summary::after, dialog.xl details > summary::before { color: #c7d2fe !important; }
dialog.xl details > summary .icon { color: #fff; }
dialog.xl details > summary .chip { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.25); }
dialog.xl details > summary .chip.st-approved { background: #10b981; border-color: #10b981; }
dialog.xl details > summary .chip.st-not_approved { background: #dc2626; border-color: #dc2626; }
dialog.xl details.fold, dialog.xl details.more-box { border-color: var(--soft-blue); }
dialog.xl details.calls-box { border-top: 0; padding-top: 0; }
dialog.xl details.calls-box[open] { border: 1px solid var(--soft-blue); border-radius: 10px; }
dialog.xl details.calls-box[open] > *:not(summary) { margin-inline: .6rem; }
dialog.xl details.calls-box > summary { margin: 0; }

/* ===== חלון החידוש: שלושת המקטעים נכנסים למסך בלי גלילה ===== */
.kv.kv2 { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: .15rem .5rem; font-size: .78rem; align-items: baseline; }
.kv.kv2 dt { font-size: .68rem; white-space: nowrap; }
.kv.kv2 dd { font-weight: 600; }
.edit-compact { grid-template-columns: 1fr 1fr; gap: .3rem .5rem; }
.edit-compact .field { margin-bottom: 0; }
.edit-compact .field label { font-size: .68rem; margin-bottom: .05rem; }
.edit-compact input, .edit-compact select { height: 30px; padding: .15rem .45rem; font-size: .8rem; }
.client-mail { color: var(--muted); margin-top: .15rem; }
.rv-section-head { padding: .45rem .8rem; gap: .5rem; }
.rv-section-head .sec-num { width: 22px; height: 22px; font-size: .75rem; }
.rv-section-head .sec-titles { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.rv-section-head .sec-name { font-size: .92rem; }
dialog.xl .rv-section-body { padding: 0 .75rem .6rem; }
dialog.xl .sub-block { padding: .45rem 0; }
dialog.xl .sub-block .card-head { margin-bottom: .25rem; }
dialog.xl .sub-block .card-head h3 { font-size: .8rem; }
dialog.xl .card-head .btn-sm { padding: .1rem .45rem; font-size: .72rem; }
dialog.xl .phones { margin-bottom: 0; display: flex; flex-wrap: wrap; gap: .1rem .9rem; }
dialog.xl .phone-row { font-size: .8rem; gap: .35rem; }
dialog.xl .phone-row .btn { padding: .05rem .3rem; }
dialog.xl .more-box { margin-top: .4rem; }
dialog.xl details > summary { padding: .4rem .7rem; font-size: .8rem; }
dialog.xl details.fold { margin-top: .45rem; }
.fold-body .offer-preview .op-head { margin-bottom: .2rem; }
.offer-preview .op-insurer { font-size: 1rem; }
.offer-preview .op-prices { margin-top: .3rem; }
.op-actions { margin-top: .4rem; }
.op-actions .icon-btn { padding: .2rem .45rem; min-width: 50px; }
.stepper { padding: .35rem 0 .1rem; gap: .2rem; }
.step { font-size: .64rem; padding: 0 .4rem 0 .15rem; }
.step i { width: 14px; height: 14px; font-size: .56rem; }

/* מקטע 3: השיחה ממלאת את כל הגובה שנשאר */
.dfold { margin-top: .45rem; border: 1px solid var(--soft-blue); border-radius: 12px; background: #fff; display: flex; flex-direction: column; min-height: 0; }
.dfold > .dsum { background: var(--soft-blue); color: #fff; border-radius: 10px; padding: .4rem .7rem; font-size: .8rem; font-weight: 700; display: flex; align-items: center; gap: .45rem; cursor: pointer; user-select: none; flex: none; }
.dfold.open > .dsum { border-radius: 10px 10px 0 0; }
.dfold > .dsum .xs, .dfold > .dsum .muted { color: #dbeafe !important; font-weight: 500; }
.dfold > .dsum::after { content: '▸'; margin-inline-start: auto; color: #dbeafe; }
.dfold.open > .dsum::after { content: '▾'; }
.dfold > .fold-body { display: none; padding: .4rem .5rem .5rem; }
.dfold.open > .fold-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.s-docs .actions-log { max-height: 15vh; }
@media (min-width: 1201px) {
  .s-docs .rv-section-body { overflow: hidden; display: flex; flex-direction: column; }
  .s-docs .rv-section-body > * { flex: none; }
  .s-docs .rv-section-body > .dfold.open { flex: 1 1 auto; min-height: 120px; }
  .s-docs .dfold.open .chat-block { flex: 1 1 auto !important; min-height: 0; display: flex; flex-direction: column; }
  .s-docs .dfold.open .chat-block .timeline { flex: 1 1 auto; height: auto; min-height: 50px; }
  .s-docs .calls-box[open] > *:not(summary) { max-height: 20vh; overflow-y: auto; }
}
.s-docs .composer { margin-top: .35rem; }
.s-docs .composer textarea { min-height: 36px; height: 36px; }

/* בועות שיחה: ההודעות שלי — צהוב, של הצד השני — לבן (אצל הצוות: הנציג צהוב; אצל הלקוח: הלקוח צהוב) */
.msg.me { background: #fde68a; color: #422006; border: 1px solid #fcd34d; }
.msg.me .meta { color: #92400e; }
.msg.me a { color: #78350f; }
.msg.them { background: #fff; color: var(--text); }
dialog.xl .ready-list { flex-direction: row; flex-wrap: wrap; gap: .25rem; font-size: .72rem; margin-bottom: .4rem; }
dialog.xl .ready-item { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: .05rem .5rem; gap: .25rem; }
dialog.xl .ready-item:not(.ok) { color: #b45309; background: #fffbeb; border-color: #fde68a; }
dialog.xl .ready-item.ok { background: var(--ok-soft); border-color: #a7f3d0; }
dialog.xl .fold-body .sub-block { padding: .35rem 0; }
dialog.xl .req-add { gap: .5rem; align-items: center; justify-content: space-between; margin-top: .2rem; }
dialog.xl .upload-line { margin: .1rem 0; }
dialog.xl .upload-line select, dialog.xl .upload-line .btn { height: 30px; font-size: .78rem; }
dialog.xl .fold-body .btn-sm, dialog.xl .fold-body .btn { font-size: .76rem; padding: .2rem .55rem; }
dialog.xl .warn-box, dialog.xl .err-box { font-size: .74rem; padding: .35rem .55rem; margin: .25rem 0; }
dialog.xl .doc-row { padding: .25rem .4rem; font-size: .78rem; }
.offer-form .price-row.two { grid-template-columns: 1fr 1fr 2fr; }
.offer-form .price-row.two .price-note { grid-column: auto; padding: 0 0 .45rem; }
@media (max-width: 700px) { .offer-form .price-row.two { grid-template-columns: 1fr 1fr; } .offer-form .price-row.two .price-note { grid-column: 1 / -1; } }

/* ===== חלון החידוש קטן ב-30% ובלי שום גלילה (מחשב) ===== */
@media (min-width: 1201px) {
  dialog.xl { width: max(63vw, min(90vw, 1150px)); max-width: 96vw; height: max(80vh, min(90vh, 700px)); max-height: 94vh; }
  dialog.xl .rv-body { gap: .55rem; padding: .55rem .65rem; }
  dialog.xl .rv-head { padding: .45rem .8rem; gap: .6rem; }
  dialog.xl .rv-head .title h2 { font-size: 1.02rem; }
  dialog.xl .rv-head .title .sub { font-size: .74rem; }
  dialog.xl .rv-head select { height: 30px; padding: .1rem .45rem; font-size: .8rem; }
  dialog.xl .rv-head .head-field > span { display: none; }
  dialog.xl .rv-section-body { overflow: hidden !important; padding: 0 .55rem .45rem; }
  dialog.xl .rv-section-head { padding: .35rem .6rem; }
  dialog.xl .rv-section-head .xs.muted { display: none; }
  dialog.xl .kv.kv2 { font-size: .74rem; gap: .1rem .4rem; }
  dialog.xl .kv.kv2 dt { font-size: .64rem; }
  dialog.xl .sub-block { padding: .3rem 0; }
  /* היסטוריה: רק האחרונות נראות, בלי גלגלת */
  dialog.xl .actions-log { overflow: hidden; max-height: 4.6rem; }
  dialog.xl .s-docs .dfold.open .chat-block .timeline { overflow-y: auto; overscroll-behavior: contain; }
  dialog.xl .s-docs .rv-section-body > .dfold.open { flex: 1 1 auto; min-height: 90px; }
  dialog.xl .s-docs .dfold.open > .fold-body { overflow: hidden; }
  dialog.xl .offer-preview .kv.kv2 { font-size: .72rem; }
}
.all-btn { margin-inline-start: auto; font-size: .66rem; padding: 0 .45rem; height: 20px; border-radius: 6px; background: rgba(255,255,255,.2); color: #fff; border: 1px solid rgba(255,255,255,.35); }
details.fold > summary .all-btn + *, .dsum .all-btn { }
dialog.xl details > summary:has(.all-btn)::after { margin-inline-start: .4rem; }
.dfold > .dsum:has(.all-btn)::after { margin-inline-start: .4rem; }
.history-box { max-height: 65vh; overflow-y: auto; }
.history-box .actions-log, .history-box .timeline { max-height: none; overflow: visible; height: auto; }
dialog.xl .op-req { font-size: .72rem; padding: .2rem .45rem; }
dialog.xl .op-reqs { gap: .15rem; margin-top: .3rem; }
dialog.xl .offer-preview .op-price { font-size: .8rem; }
.plate { white-space: nowrap; }

/* שדה מספר רישוי — כמו לוחית רישוי */
input.plate-input { background: #fde047 !important; color: #111 !important; border: 2px solid #ca8a04 !important; border-radius: 6px; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .12em; text-align: center; direction: ltr; max-width: 180px; }
input.plate-input::placeholder { color: rgba(17,17,17,.35); }
input.plate-input:focus { box-shadow: 0 0 0 3px rgba(202,138,4,.25); }
.offer-form input.plate-input { max-width: none; }
td.row-actions { white-space: nowrap; width: 1%; }

/* סימטריה: כל כותרות החלונות הנפתחים במקטעים 2 ו-3 באותו גובה ובאותם רווחים */
.rv-head .stepper { padding: 0; flex: 0 1 auto; max-width: 46%; }
dialog.xl details > summary, dialog.xl .dfold > .dsum { min-height: 34px; box-sizing: border-box; display: flex; align-items: center; gap: .45rem; padding: 0 .7rem; font-size: .8rem; line-height: 1.2; }
dialog.xl details.more-box > summary::before { content: none; }
dialog.xl details.more-box > summary::after { content: '▸'; margin-inline-start: auto; }
dialog.xl details.more-box[open] > summary::after { content: '▾'; }
dialog.xl .rv-section-body > details.fold, dialog.xl .rv-section-body > details.more-box, dialog.xl .rv-section-body > .dfold { margin-top: .45rem; }
dialog.xl details > summary .chip { padding: .05rem .5rem; font-size: .68rem; line-height: 1.3; }
.all-btn { height: 18px; line-height: 16px; }
@media (max-width: 1200px) { .rv-head .stepper { max-width: none; flex-basis: 100%; order: 5; } }

/* ===== מסך לקוחות + תיק לקוח — עיצוב מודרני ===== */
.avatar-c { --av: #4f46e5; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center; flex: none; font-weight: 800; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--av), color-mix(in srgb, var(--av) 65%, #fff)); box-shadow: 0 4px 10px color-mix(in srgb, var(--av) 30%, transparent); }
.avatar-c.lg { width: 64px; height: 64px; border-radius: 18px; font-size: 1.4rem; }
.cl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.cl-stat { display: flex; align-items: center; gap: .75rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; box-shadow: var(--shadow-sm); }
.cl-stat b { display: block; font-size: 1.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cl-stat span { color: var(--muted); font-size: .78rem; }
.cl-stat-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.cl-stat.blue .cl-stat-ico { background: #e0f2fe; color: #0284c7; }
.cl-stat.amber .cl-stat-ico { background: #fef3c7; color: #b45309; }
.cl-stat.green .cl-stat-ico { background: #d1fae5; color: #047857; }
.cl-filter { display: flex; gap: .35rem; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: .35rem; border-radius: 999px; padding: .3rem .75rem; font-size: .82rem; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pill-n { font-size: .7rem; background: rgba(0,0,0,.06); border-radius: 999px; padding: 0 .4rem; }
.pill.on .pill-n { background: rgba(255,255,255,.22); }
.cl-list { display: flex; flex-direction: column; }
.cl-row { display: grid; grid-template-columns: auto minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1.5fr) auto; align-items: center; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid var(--line-2); color: inherit; transition: background .15s; }
.cl-row:hover { background: #f8faff; text-decoration: none; }
.cl-row:last-child { border-bottom: 0; }
.cl-main { min-width: 0; }
.cl-name { font-weight: 700; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-sub { display: flex; flex-wrap: wrap; gap: .2rem .8rem; color: var(--muted); font-size: .8rem; margin-top: .1rem; }
.cl-sub span { display: inline-flex; align-items: center; gap: .25rem; }
.cl-types { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.type-ico.sm { width: 26px; height: 26px; border-radius: 8px; }
.cl-ins { display: flex; flex-direction: column; min-width: 0; font-size: .85rem; }
.cl-ins b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-ins span { color: var(--muted); font-size: .76rem; }
.cl-next { display: flex; flex-direction: column; gap: .15rem; font-size: .85rem; }
.cl-next .row { gap: .35rem; flex-wrap: wrap; }
.cl-next-l { color: var(--muted); font-size: .7rem; }
.cl-go { color: var(--faint); font-size: 1.4rem; }
@media (max-width: 900px) {
  .cl-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: .3rem .75rem; }
  .cl-types, .cl-ins { grid-column: 2 / -1; }
  .cl-next { grid-column: 2 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: .4rem; }
  .cl-go { grid-row: 1; grid-column: 3; }
}
/* תיק לקוח */
.back-link { display: inline-block; margin-bottom: .6rem; font-size: .88rem; }
.cl-hero { padding: 1.2rem 1.3rem; margin-bottom: 1rem; background: linear-gradient(135deg, #fff 0%, #f5f7ff 100%); }
.cl-hero-main { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.cl-hero-txt { flex: 1; min-width: 200px; }
.cl-hero-txt h1 { margin: 0 0 .3rem; font-size: 1.5rem; }
.cl-hero-sub { display: flex; gap: .4rem; flex-wrap: wrap; }
.cl-hero-sub .chip { display: inline-flex; align-items: center; gap: .3rem; }
.cl-hero-actions { display: flex; gap: .5rem; }
.btn-danger-ghost { color: #dc2626; border-color: #fecaca; background: #fff; }
.btn-danger-ghost:hover { background: #fef2f2; }
.cl-contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; margin-top: 1rem; }
.cl-contact { display: flex; align-items: center; gap: .65rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .55rem .75rem; }
.cl-contact > div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cl-contact a.bold { overflow: hidden; text-overflow: ellipsis; }
.cl-contact-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.cl-notes { margin-top: .8rem; padding: .6rem .8rem; border-radius: 12px; background: #fffbeb; border: 1px dashed #fcd34d; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin: 1.2rem 0 .7rem; }
.section-head h2 { margin: 0; font-size: 1.1rem; display: flex; align-items: center; gap: .45rem; }
.pol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .85rem; margin-bottom: 1.2rem; }
.pol-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: .6rem; border-top: 4px solid var(--primary); transition: box-shadow .15s, transform .15s; }
.pol-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.pol-card.t-border-car { border-top-color: var(--car, #0ea5e9); }
.pol-card.t-border-home { border-top-color: var(--home, #10b981); }
.pol-card.t-border-business { border-top-color: var(--business, #8b5cf6); }
.pol-top { display: flex; align-items: center; gap: .6rem; }
.pol-top .grow { min-width: 0; }
.pol-mid { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-height: 24px; }
.pol-kv { background: var(--surface-2); border-radius: 10px; padding: .45rem .6rem; }
.pol-foot { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding-top: .6rem; margin-top: auto; }
.pol-foot .btn-primary { margin-inline-start: auto; }
.cl-timeline { display: flex; flex-direction: column; gap: .2rem; position: relative; }
.cl-tl-item { display: flex; gap: .7rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); }
.cl-tl-item:last-child { border-bottom: 0; }
.cl-tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); margin-top: .35rem; flex: none; box-shadow: 0 0 0 4px var(--primary-soft); }
@media (max-width: 700px) {
  .cl-stats { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .cl-stat { padding: .55rem .65rem; gap: .5rem; }
  .cl-stat b { font-size: 1.05rem; }
  .cl-stat-ico { width: 32px; height: 32px; border-radius: 9px; }
  .cl-hero { padding: .9rem; }
  .cl-hero-txt h1 { font-size: 1.2rem; }
  .avatar-c.lg { width: 50px; height: 50px; font-size: 1.1rem; }
  .pol-grid { grid-template-columns: 1fr; }
}

/* ===== לוח החידושים: כל רשומה בשורה אחת, רווח קטן ===== */
table.grid tbody td { padding-top: .28rem; padding-bottom: .28rem; }
table.grid td.one-line { white-space: nowrap; }
table.grid td.one-line > * { margin-inline-end: .35rem; vertical-align: middle; }
table.grid td.one-line .xs { display: inline; }
table.grid td.one-line .type-ico.sm { width: 22px; height: 22px; display: inline-grid; }
table.grid select.agent-inline { height: 26px; padding-block: 0; }
table.grid tbody td .chip { padding-block: .05rem; }

/* ===== מסך לקוחות: שורה אחת לכל לקוח, רווח קטן ===== */
.cl-row { padding: .3rem .9rem; gap: .8rem; }
.cl-row .avatar-c { width: 30px; height: 30px; border-radius: 9px; font-size: .78rem; box-shadow: none; }
.cl-main { display: flex; align-items: baseline; gap: .7rem; white-space: nowrap; overflow: hidden; }
.cl-name { font-size: .9rem; }
.cl-sub { flex-wrap: nowrap; margin: 0; font-size: .76rem; overflow: hidden; }
.cl-ins { flex-direction: row; align-items: baseline; gap: .5rem; white-space: nowrap; }
.cl-next { flex-direction: row; align-items: center; gap: .4rem; white-space: nowrap; }
.cl-types .plate { font-size: .72rem; }
.cl-go { font-size: 1.1rem; }

/* ===== תיק לקוח: מסמכים + חלון פוליסה ===== */
.pol-card { cursor: pointer; }
.doc-lines { display: flex; flex-direction: column; }
.doc-line { display: flex; align-items: center; gap: .6rem; padding: .35rem .2rem; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.doc-line:last-child { border-bottom: 0; }
.doc-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.doc-ico.src-policy { background: #d1fae5; } .doc-ico.src-client { background: #fef3c7; } .doc-ico.src-internal { background: #fee2e2; } .doc-ico.src-agent { background: #e0e7ff; }
.doc-name { display: flex; flex-direction: column; flex: 1 1 180px; min-width: 0; }
.doc-name b { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-name .xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-pol { display: inline-flex; align-items: center; gap: .25rem; }
.chip.src-policy { background: #ecfdf5; color: #047857; } .chip.src-client { background: #fffbeb; color: #b45309; } .chip.src-internal { background: #fef2f2; color: #b91c1c; } .chip.src-agent { background: #eef2ff; color: #4338ca; }
.doc-acts { display: flex; gap: .3rem; margin-inline-start: auto; }
.doc-acts .btn-sm { padding: .2rem .5rem; font-size: .76rem; }
.icon.flip { transform: rotate(180deg); }
dialog:has(.pm-body) { width: min(880px, calc(100vw - 1rem)); }
.pm-body { display: flex; flex-direction: column; gap: .9rem; }
.pm-sec { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .85rem; }
.pm-title { display: flex; align-items: center; gap: .45rem; font-weight: 700; margin-bottom: .5rem; color: var(--primary-600, #4338ca); }
.pm-title .chip { margin-inline-start: auto; }
.pm-offer-head { display: flex; flex-direction: column; gap: .1rem; margin-bottom: .5rem; }
.pm-prices { display: flex; flex-direction: column; gap: .25rem; margin: .6rem 0; border-top: 1px dashed var(--line); padding-top: .5rem; }
.pm-price { display: flex; align-items: baseline; gap: .6rem; }
.pm-choice { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }

/* שליפת פרטי רכב לפי מספר רישוי */
.plate-hint { margin-top: 2px; line-height: 1.3; }
.plate-hint.ok { color: #15803d; font-weight: 600; }
.plate-hint.err { color: #b91c1c; }
input.auto-filled, select.auto-filled { background: #dcfce7 !important; transition: background .4s; }

/* פרטי רכב חסרים: ריבוע אדום מהבהב + התראה */
.miss-sq { display: inline-block; width: 10px; height: 10px; background: #dc2626; border-radius: 2px; margin-inline-start: 6px; vertical-align: middle; animation: blink 1s infinite; box-shadow: 0 0 0 2px rgba(220,38,38,.25); }
.miss-val { color: #b91c1c !important; font-weight: 700; }
.miss-warn { display: flex; align-items: center; gap: 6px; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 4px 8px; margin: 4px 0 6px; font-weight: 600; }
.miss-warn .miss-sq { margin: 0; }
.field.is-missing input, .field.is-missing select, .named-cell.is-missing input { border-color: #dc2626 !important; background: #fff5f5; }
.flash-miss { animation: flashMiss 1.2s ease 2; border-radius: 10px; }
@keyframes flashMiss { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 0 3px #dc2626; } }
.chk-line { display: flex; align-items: center; gap: 8px; }
.chk-line input[type="text"] { flex: 1; min-width: 0; }
.chk-line .need-chk { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: .85rem; }
.field.w-full { grid-column: 1 / -1; }
.named-box { display: flex; flex-direction: column; gap: 6px; }
.named-row { display: grid; grid-template-columns: auto 1.4fr 1fr 1fr 1fr; gap: 6px; align-items: end; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 6px; }
.named-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.named-cell input { width: 100%; min-width: 0; }
@media (max-width: 700px) { .named-row { grid-template-columns: 1fr 1fr; } .named-row > span { grid-column: 1 / -1; } }

/* ===== נהג מזדמן — כפתור לאתר חברת הביטוח + בועית מחירים/תנאים (public/occ.js) ===== */
.occ-wrap { display: flex; flex-wrap: wrap; gap: .5rem; align-items: stretch; margin-bottom: .9rem; max-width: 100%; }
.occ-wrap > * { min-width: 0; }
.occ-wrap.small { display: inline-flex; margin: 0; gap: .35rem; }
.occ-go { font-weight: 700; flex: 1 1 12rem; text-align: center; justify-content: center; }
.occ-info { display: none; white-space: nowrap; font-weight: 700; color: var(--car); background: var(--car-soft); border-color: #bae6fd; }
/* כפתור "₪ מחירים ותנאים" — בכל מכשיר מגע או מסך צר (יש טלפונים שמדווחים בטעות שיש להם עכבר) */
@media (hover: none), (pointer: coarse), (any-pointer: coarse), (max-width: 900px) { .occ-info { display: inline-flex; } }
.occ-wrap.touch .occ-info { display: inline-flex; }
.occ-info { align-items: center; justify-content: center; flex: 1 0 auto; }
.occ-url { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.occ-bubble { position: fixed; z-index: 1000; background: #fff; color: var(--text); border-radius: 16px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .22), 0 2px 6px rgba(15, 23, 42, .08); border: 1px solid #e0e7ff;
  animation: occ-in .14s ease-out; text-align: right; direction: rtl; }
.occ-bubble.scroll { overflow-y: auto; overscroll-behavior: contain; }
.occ-bubble.scroll::after { display: none; }
.occ-bubble[hidden] { display: none; }
@keyframes occ-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.occ-bubble::after { content: ''; position: absolute; right: var(--arrow-right, 24px); bottom: -7px; width: 14px; height: 14px;
  background: #fff; border-right: 1px solid #e0e7ff; border-bottom: 1px solid #e0e7ff; transform: rotate(45deg); }
.occ-bubble.below::after { bottom: auto; top: -7px; transform: rotate(225deg); background: linear-gradient(135deg, #eef2ff, #e0f2fe); }
.occ-sec { padding: .7rem .9rem; }
.occ-sec-prices { background: linear-gradient(135deg, #eef2ff, #e0f2fe); border-radius: 16px 16px 0 0; }
.occ-sec + .occ-sec-terms { border-top: 2px dashed #c7d2fe; }
.occ-sec-title { font-weight: 800; font-size: .82rem; color: var(--primary-600); margin-bottom: .4rem; letter-spacing: .2px; }
.occ-prices { display: flex; flex-direction: column; gap: .3rem; }
.occ-price-row { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; background: rgba(255, 255, 255, .75);
  border-radius: 10px; padding: .32rem .6rem; font-size: .9rem; }
.occ-price-value { color: var(--primary-600); font-size: 1rem; white-space: nowrap; }
.occ-terms { margin: 0; padding-inline-start: 1.1rem; font-size: .86rem; line-height: 1.5; }
.occ-terms li::marker { color: var(--car); }
.occ-foot { font-size: .72rem; color: var(--muted); padding: .45rem .9rem .6rem; border-top: 1px solid var(--line-2); }

/* מסלולי ביטוח לפי חברה — חלון ניהול קטן */
.track-manage { display: flex; flex-direction: column; gap: .5rem; min-width: min(420px, 86vw); }
.track-list { display: flex; flex-direction: column; gap: .35rem; }
.track-row { display: flex; gap: .4rem; align-items: center; }
.track-row input { flex: 1; min-width: 0; }
.track-new { border-top: 1px solid var(--line, #e2e8f0); padding-top: .5rem; }
.offer-named .named-row { padding: 4px 6px; }

/* פורטל: בקשת שינוי בהצעה */
.change-box { margin-top: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.change-toggle { background: #fff; border: 1px dashed #94a3b8; color: var(--text); }
.change-form { display: flex; flex-direction: column; gap: .4rem; }
.change-form textarea { width: 100%; }
/* בקשת שינוי בהצעה מהלקוח — בחלון החידוש */
.msg.change-req { border: 2px solid #f59e0b; background: #fff7e6; }

/* ===== כלל ברזל: בלוח החידושים כל רשומה בשורה אחת (אף פעם לא שתי שורות) ===== */
table.board-grid td, table.board-grid td.name, table.board-grid td.wrap { white-space: nowrap !important; word-break: normal; min-width: 0; padding-inline: .4rem; }
table.board-grid td > div { display: inline; }
table.board-grid td .chip { white-space: nowrap; }
table.board-grid td.name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.board-grid tbody td { font-size: .82rem; }
.occ-old { color: var(--warn); font-weight: 700; white-space: nowrap; }

/* ===== פורטל לקוח — הצעה בעמוד אחד (קומפקטי, בלי גלילה במחשב) ===== */
.portal-head { padding: .7rem 1rem 2rem; display: flex; align-items: baseline; justify-content: center; gap: .6rem; flex-wrap: wrap; }
.portal-head .agency { font-size: 1.1rem; letter-spacing: .01em; }
.portal-head .small { opacity: .8; font-size: .78rem; }
.portal main { max-width: 1120px; margin: -1.5rem auto 0; padding: 0 1rem 1rem; }
.portal .card { padding: .75rem .95rem; margin-bottom: .6rem; border-radius: 16px; }
.portal h2 { margin-bottom: .45rem; }
.portal .check-row { margin: .35rem 0; gap: .45rem; }
.portal .check-row input { width: 18px; height: 18px; margin-top: .15rem; }
/* כרטיס פתיחה */
.card.hello { display: flex; align-items: center; gap: .3rem 1.2rem; flex-wrap: wrap; box-shadow: var(--shadow); }
.hello-top { display: flex; align-items: center; gap: .6rem; }
.hello-top h1 { font-size: 1.2rem; }
.hello-sub { margin: 0; font-size: .88rem; color: #374151; }
.hello-meta { display: flex; gap: .35rem 1rem; flex-wrap: wrap; font-size: .82rem; margin-inline-start: auto; }
.hello-meta .muted { font-size: .76rem; }
/* ההצעה: שתי עמודות */
.card.offer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 0 1.3rem; padding: .9rem 1.1rem; border: 1.5px solid #c7d2fe;
  box-shadow: 0 1px 3px rgba(17,24,39,.06), 0 12px 32px rgba(79,70,229,.08); position: relative; overflow: hidden; }
.card.offer::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #0891b2, #4f46e5, #312e81); }
.card.offer.single { grid-template-columns: 1fr; }
.offer-info { min-width: 0; }
.offer-pay { min-width: 0; display: flex; flex-direction: column; gap: .45rem; padding-inline-start: 1.3rem; border-inline-start: 1px dashed var(--line); }
.offer-head { text-align: start; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 .8rem; padding-bottom: .45rem; margin-bottom: .45rem; }
.offer-title { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.offer-insurer { font-size: 1.45rem; line-height: 1.15; }
.offer-dates { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.offer-dates b { color: var(--text); font-weight: 600; }
.offer-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .9rem; margin: 0; }
.okv { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .22rem 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.okv.wide { grid-column: 1 / -1; }
.okv dt { color: var(--muted); font-size: .76rem; white-space: nowrap; }
.okv dd { margin: 0; font-weight: 600; font-size: .86rem; text-align: end; min-width: 0; word-break: break-word; }
.portal .req-notes { gap: .3rem; margin: .5rem 0 0; }
.portal .req-note { padding: .3rem .6rem; border-radius: 10px; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; font-size: .9rem; }
.portal .offer-note { margin: .4rem 0 0; padding: .35rem .6rem; }
/* מחירים */
.portal .offer-prices { margin: 0; gap: .35rem; }
.portal .price-block { padding: .4rem .6rem; border-radius: 11px; background: linear-gradient(180deg, #fafbff, #f5f6fb); }
.portal .price-line { align-items: center; gap: .55rem; }
.price-label { font-weight: 700; min-width: 3.2rem; }
.portal .price-block select { flex: 1; min-width: 0; width: auto; padding: .28rem .5rem; font-size: .84rem; border-radius: 8px; }
.portal .big-price { font-size: 1.2rem; color: var(--primary-600); white-space: nowrap; margin-inline-start: auto; }
.portal .full-price { margin-top: .25rem; font-size: .74rem; font-weight: 500; color: var(--muted); background: transparent; border: 0; padding: 0; }
.portal .full-price.with-interest { color: #b45309; background: transparent; }
.portal .price-line.total { border-top: 0; padding: .4rem .7rem; border-radius: 11px; background: var(--primary-soft); color: var(--primary-600); font-weight: 700; font-size: .95rem; }
.total-price { font-size: 1.3rem; }
/* תשלום ואישור */
.portal .pay-box { margin: 0; padding: .45rem .65rem; gap: .2rem; border-radius: 11px; }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; font-size: .86rem; color: var(--text); }
.portal input.last4 { width: 86px; padding: .25rem .4rem; font-size: 1.05rem; }
.portal input.license-input { width: 100px; padding: .25rem .4rem; font-size: .95rem; }
.card-l4 { font-size: 1.05rem; letter-spacing: .18rem; }
.portal .pay-box .check-row { margin: .1rem 0 0; }
.portal .confirm-row { margin: .05rem 0; font-size: .84rem; }
.approve-btn { padding: .6rem; font-size: 1.02rem; font-weight: 700; border-radius: 12px; box-shadow: 0 6px 18px rgba(5,150,105,.25); }
.portal .change-box { margin-top: 0; gap: .3rem; }
.portal .change-toggle { padding: .35rem; font-size: .84rem; border-radius: 10px; color: var(--muted); }
.portal .change-form textarea { min-height: 56px; }
.portal .ok-box { margin: 0; }
.portal .chat-toggle { margin-bottom: .4rem; padding: .5rem; font-size: .92rem; border-radius: 12px; border-width: 1.5px; }
.portal main > p.small { margin: .2rem 0 0; text-align: center; font-size: .74rem; }
.portal .occ-wrap { margin-bottom: .6rem; }
/* נייד / מסך צר: עמודה אחת, עדיין צפוף */
@media (max-width: 860px) {
  .portal main { padding: 0 .55rem .8rem; }
  .card.hello { gap: .2rem .8rem; }
  .hello-meta { margin-inline-start: 0; }
  .card.offer { grid-template-columns: 1fr; padding: .75rem .8rem; }
  .offer-pay { padding: .55rem 0 0; margin-top: .5rem; border-inline-start: 0; border-top: 1px dashed var(--line); }
  .offer-insurer { font-size: 1.3rem; }
}
@media (max-width: 480px) {
  .okv { flex-direction: column; align-items: flex-start; gap: 0; padding: .18rem 0; }
  .okv dt { font-size: .7rem; white-space: normal; }
  .okv dd { text-align: start; font-size: .84rem; }
  .hello-sub { font-size: .82rem; }
  .offer-head { grid-template-columns: 1fr; }
  .offer-dates { font-size: .76rem; }
}

/* ===== צבעי השיחה לפי מי ששלח (גם אצל הצוות וגם אצל הלקוח): הסוכנות — צהוב נעים, הלקוח — ירוק בהיר נעים ===== */
.msg.agent, .msg.me.agent, .msg.them.agent { background: #fef3c7; color: #422006; border: 1px solid #fde68a; }
.msg.agent .meta { color: #92400e; }
.msg.agent a { color: #78350f; }
.msg.client, .msg.me.client, .msg.them.client { background: #dcfce7; color: #14532d; border: 1px solid #bbf7d0; }
.msg.client .meta { color: #166534; }
.msg.client a { color: #166534; }
.msg.approval.client { font-weight: 600; text-align: start; }
.msg.quote.agent { border-width: 1px; }
/* השיחה נגללת עם גלגלת העכבר בתוך החלונית */
.s-docs .chat-block .timeline { overflow-y: auto; }
.msg.approval.client.them { align-self: flex-end; }
.msg.approval.client.me { align-self: flex-start; }
.msg.quote.agent { box-shadow: none; }

/* ===== פורטל: הצעת חידוש מחולקת לחלקים יפים ===== */
.card.offer2 { padding: 0; overflow: hidden; display: block; }
.o-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; background: linear-gradient(135deg, #eef2ff, #f5f3ff); border-bottom: 1px solid #e0e7ff; }
.o-title { font-size: .8rem; color: var(--muted); }
.o-insurer { font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.o-dates { display: flex; flex-direction: column; align-items: flex-end; font-size: .85rem; }
.o-dates b { font-size: .95rem; }
.o-sec { padding: .9rem 1.2rem; border-bottom: 1px solid var(--line-2); }
.o-sec:last-child { border-bottom: 0; }
.o-sec-title { display: flex; align-items: center; gap: .45rem; font-weight: 800; font-size: .92rem; margin-bottom: .6rem; color: #1f2937; }
.o-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); font-size: .95rem; }
.o-grid2 { display: grid; grid-template-columns: 1.2fr 1fr; border-bottom: 1px solid var(--line-2); }
.o-grid2 > .o-sec { border-bottom: 0; }
.o-grid2 > .o-sec + .o-sec { border-inline-start: 1px solid var(--line-2); }
.o-grid2 > .o-sec:only-child { grid-column: 1 / -1; }
.o-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .1rem 1rem; margin: 0; }
.o-kv-row { display: flex; justify-content: space-between; gap: .6rem; padding: .3rem 0; border-bottom: 1px dashed var(--line-2); font-size: .88rem; }
.o-kv-row dt { color: var(--muted); }
.o-kv-row dd { margin: 0; font-weight: 700; text-align: end; }
.o-drivers { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.o-driver { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; font-size: .84rem; display: flex; flex-direction: column; gap: .1rem; }
.o-driver b { font-size: .78rem; color: var(--primary); }
.o-reqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .5rem; }
.o-req { display: flex; flex-direction: column; gap: .15rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: .5rem .7rem; font-size: .85rem; }
.o-req.lien { background: #eff6ff; border-color: #bfdbfe; }
.o-prices { display: flex; flex-direction: column; gap: .45rem; }
.o-price { display: grid; grid-template-columns: 7rem auto 1fr; align-items: center; gap: .3rem .8rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: .5rem .8rem; }
.o-price-label { font-weight: 800; }
.o-price-plan { color: var(--muted); font-size: .85rem; }
.o-sel { width: auto; min-width: 0; max-width: 11rem; height: 34px; padding: .1rem .5rem; font-size: .88rem; border-radius: 9px; }
.o-price-end { display: flex; align-items: baseline; justify-content: flex-end; gap: .45rem; }
.o-price-note { font-size: .72rem; color: #b45309; }
.o-price-sum { font-size: 1.25rem; color: var(--primary); font-variant-numeric: tabular-nums; text-align: end; }
.o-occ { grid-column: 1 / -1; display: flex; padding-top: .35rem; border-top: 1px dashed var(--line); }
.o-occ .occ-wrap.small { display: flex; flex-wrap: wrap; gap: .4rem; }
.o-occ .occ-wrap .btn { font-size: .8rem; padding: .25rem .7rem; }
.o-occ .occ-info { display: inline-flex; flex: 0 0 auto; }
.o-price.total { background: #eef2ff; border-color: #c7d2fe; grid-template-columns: 1fr auto; }
.o-price.total > span:nth-child(2) { display: none; }
.o-total-sum { font-size: 1.45rem; color: var(--primary); }
.o-pay-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; font-size: .9rem; padding: .3rem 0; }
.o-small-input { width: 7.5rem; height: 36px; text-align: center; font-size: 1rem; letter-spacing: .15rem; }
.o-small-input.last4-in { width: 6rem; letter-spacing: .35rem; }
.card-l4 { font-size: 1.15rem; letter-spacing: .25rem; }
.o-approve { display: flex; flex-direction: column; gap: .6rem; background: #f8fafc; }
.o-approve .change-box { margin: 0; }
.o-approve .approve-btn { font-size: 1.05rem; padding: .75rem; }
@media (max-width: 760px) {
  .o-grid2 { grid-template-columns: 1fr; }
  .o-grid2 > .o-sec + .o-sec { border-inline-start: 0; border-top: 1px solid var(--line-2); }
  .o-head, .o-sec { padding: .8rem .9rem; }
  .o-dates { align-items: flex-start; }
  .o-price { grid-template-columns: 1fr auto; }
  .o-price .o-sel, .o-price .o-price-plan { grid-column: 1; grid-row: 2; }
  .o-price-end { grid-row: 1 / span 2; grid-column: 2; flex-direction: column; align-items: flex-end; }
}
/* כפתור השיחה עם הנציג */
.portal .chat-toggle { display: flex; align-items: center; justify-content: center; gap: .5rem; background: #fff; border: 1px solid #c7d2fe; color: var(--primary); font-weight: 700; border-radius: 14px; padding: .8rem; box-shadow: var(--shadow-sm); }
.portal .chat-toggle:hover { background: #eef2ff; }

/* ===== פורטל: ההצעה בעמוד אחד מרוכז (קצת פחות מ-A4) — שתי עמודות: פרטים | מחיר ואישור ===== */
.o-cols { display: grid; grid-template-columns: 1fr 1fr; }
.o-col-info { border-inline-end: 1px solid var(--line-2); }
.o-col .o-sec { padding: .55rem .9rem; }
.o-col-info .o-sec + .o-sec { border-top: 1px solid var(--line-2); }
.o-col .o-sec { border-bottom: 0; }
.o-col-pay .o-sec + .o-sec { border-top: 1px solid var(--line-2); }
.o-head { padding: .6rem .9rem; }
.o-insurer { font-size: 1.3rem; }
.o-sec-title { font-size: .82rem; margin-bottom: .35rem; }
.o-ico { width: 22px; height: 22px; border-radius: 7px; font-size: .8rem; }
.o-kv { grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
.o-kv-row { padding: .15rem 0; font-size: .8rem; }
.o-drivers { gap: .2rem; margin-top: .3rem; }
.o-driver { flex-direction: row; flex-wrap: wrap; gap: .3rem; padding: .25rem .5rem; font-size: .76rem; border-radius: 8px; }
.o-driver b { font-size: .76rem; }
.o-reqs { grid-template-columns: 1fr; gap: .3rem; }
.o-req { flex-direction: row; flex-wrap: wrap; gap: .35rem; padding: .3rem .55rem; font-size: .78rem; border-radius: 9px; }
.o-prices { gap: .3rem; }
.o-price { grid-template-columns: 5.5rem auto 1fr; padding: .3rem .6rem; border-radius: 10px; gap: .2rem .6rem; }
.o-price-label { font-size: .88rem; }
.o-sel { height: 30px; font-size: .82rem; max-width: 9.5rem; }
.o-price-sum { font-size: 1.05rem; }
.o-total-sum { font-size: 1.2rem; }
.o-occ { padding-top: .25rem; }
.o-occ .occ-wrap .btn { font-size: .74rem; padding: .15rem .55rem; }
.o-pay-row { padding: .1rem 0; font-size: .84rem; }
.o-small-input { height: 30px; font-size: .92rem; }
.o-col .check-row { font-size: .8rem; margin: .15rem 0; }
.o-approve { gap: .35rem; }
.o-approve .approve-btn { padding: .55rem; font-size: 1rem; }
.o-approve .change-toggle { padding: .3rem; font-size: .82rem; }
@media (max-width: 760px) {
  .o-cols { grid-template-columns: 1fr; }
  .o-col-info { border-inline-end: 0; border-bottom: 1px solid var(--line-2); }
}

/* ===== פורטל — הצעה לאורך: כל נושא מתחת לקודם, רקע מתחלף, עמוד אחד בלי גלילה ===== */
.portal main { max-width: 820px; }
.o-cols { display: block; }
.o-col-info { border: 0; }
.offer2 .o-sec { border: 0 !important; padding: .45rem .9rem; }
.offer2 .o-sec.tone-a { background: #fbf6ee; }
.offer2 .o-sec.tone-b { background: #eef6fd; }
.offer2 .o-sec-title { margin-bottom: .25rem; font-size: .8rem; }
.offer2 .o-ico { width: 20px; height: 20px; background: rgba(255,255,255,.75); }
.offer2 .o-kv { grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 0 1rem; }
.offer2 .o-kv-row { border-bottom-color: rgba(0,0,0,.06); }
.offer2 .o-driver { background: rgba(255,255,255,.7); }
.offer2 .o-req { background: rgba(255,255,255,.75); }
.offer2 .o-reqs { grid-template-columns: 1fr 1fr; }
/* מחיר: שדות צרים למינימום */
.offer2 .o-price { grid-template-columns: 5.2rem max-content 1fr max-content; background: rgba(255,255,255,.8); padding: .25rem .6rem; }
.offer2 .o-sel { width: auto; max-width: none; height: 28px; padding: 0 .3rem; font-size: .8rem; }
.offer2 .o-occ { grid-column: auto; border: 0; padding: 0; justify-content: flex-start; }
.offer2 .o-occ .occ-wrap .btn { font-size: .7rem; padding: .1rem .5rem; }
.offer2 .o-price.total { grid-template-columns: 1fr max-content; background: #fff; }
.offer2 .o-price-sum { font-size: 1rem; }
.offer2 .o-total-sum { font-size: 1.15rem; }
/* תשלום: שורה אחת */
.offer2 .o-pay-row { justify-content: flex-start; gap: .5rem; }
.offer2 .o-small-input { width: 5.2rem; height: 28px; font-size: .88rem; }
.offer2 .o-small-input.last4-in { width: 4.6rem; letter-spacing: .25rem; }
.offer2 .o-cb { margin: 0; }
.offer2 .o-lock { margin-top: .1rem; }
/* אישור: בקשת שינוי למעלה, "קראתי" + כפתור באותה שורה */
.offer2 .o-approve { gap: .3rem; }
.o-approve-row { display: flex; align-items: center; gap: .7rem; }
.o-approve-row .confirm-row { flex: 1; margin: 0; font-size: .78rem; }
.o-approve-row .approve-btn { width: auto; flex: 0 0 auto; padding: .5rem 1.6rem; }
.offer2 .change-toggle { padding: .2rem; font-size: .78rem; background: rgba(255,255,255,.8); }
.portal .card.hello { margin-bottom: .45rem; }
.portal .chat-toggle { padding: .45rem; margin-top: .45rem; }
@media (max-width: 760px) {
  .offer2 .o-reqs { grid-template-columns: 1fr; }
  .offer2 .o-price { grid-template-columns: 1fr max-content; }
  .offer2 .o-price .o-sel, .offer2 .o-price .o-price-plan { grid-column: 1; grid-row: 2; justify-self: start; }
  .offer2 .o-occ { grid-column: 1 / -1; grid-row: 3; }
  .offer2 .o-price-end { grid-row: 1 / span 2; grid-column: 2; }
  .o-approve-row { flex-direction: column; align-items: stretch; }
  .o-approve-row .approve-btn { width: 100%; }
}

/* עמוד אחד: כותרת כל נושא בצד ימין (עמודה צרה), התוכן לידה */
@media (min-width: 761px) {
  .offer2 .o-sec { display: grid; grid-template-columns: 8.2rem 1fr; column-gap: .6rem; align-items: start; }
  .offer2 .o-sec > .o-sec-title { grid-column: 1; grid-row: 1 / span 6; margin: .15rem 0 0; }
  .offer2 .o-sec > :not(.o-sec-title) { grid-column: 2; }
  .offer2 .o-sec.o-approve { display: flex; }
}
.portal-head { padding: .45rem 1rem 1.6rem; }
.portal .card.hello { padding: .45rem .9rem; }
.portal .card.hello .hello-top h1 { font-size: 1.05rem; }
.offer2 .o-head { padding: .4rem .9rem; align-items: center; }
.offer2 .o-head .o-title { display: none; }
.offer2 .o-insurer { font-size: 1.15rem; }
.offer2 .o-dates { flex-direction: row; gap: .4rem; align-items: baseline; }
.offer2 .o-sec { padding: .35rem .9rem; }
.offer2 .o-kv-row { padding: .1rem 0; }
.offer2 .o-drivers { margin-top: .15rem; }
.offer2 .o-driver { padding: .15rem .45rem; }
.offer2 .o-req { padding: .2rem .5rem; }
.offer2 .o-prices { gap: .2rem; }
.offer2 .o-price { padding: .15rem .55rem; }
.offer2 .o-pay-row { display: inline-flex; padding: 0; margin-inline-end: 1rem; }
.offer2 .o-cb { display: inline-flex; }
.offer2 .o-lock { display: none; }
.offer2 .o-approve { flex-direction: column; gap: .25rem; padding-block: .35rem; }
.offer2 .o-approve .change-box { width: 100%; }
.offer2 .approve-btn { padding: .4rem 1.4rem !important; }
.portal main > p.small { margin: .1rem 0 0; }
.portal .chat-toggle { padding: .35rem; margin-top: .35rem; }

/* ===================================================================
   חלון החידוש — מראה נקי ומקצועי: מעט צבעים, ריווח נעים, קווי הפרדה
   + קיפול מקטעים לפי שלב (לפני הצעה: "תיעוד" מקופל משמאל; אחרי: "פרטי הפוליסה" מקופל מימין)
   =================================================================== */
@media (min-width: 901px) {
  dialog.xl { background: #f5f6f8; }
  dialog.xl .rv-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.05fr); gap: .75rem; padding: .7rem .8rem; transition: grid-template-columns .25s ease; overflow: hidden; }
  dialog.xl .rv-body.c-details { grid-template-columns: 46px minmax(0, 1.25fr) minmax(0, 1fr); }
  dialog.xl .rv-body.c-docs { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) 46px; }
  dialog.xl .rv-body.c-details.c-docs { grid-template-columns: 46px minmax(0, 1fr) 46px; }
  dialog.xl .rv-section { display: flex !important; grid-column: auto !important; min-height: 0; }
  dialog.xl .rv-section.collapsed .rv-section-body { display: none !important; }
  dialog.xl .rv-section.collapsed { cursor: pointer; background: #fff; }
  dialog.xl .rv-section.collapsed:hover { background: #f8fafc; }
  dialog.xl .rv-section.collapsed .rv-section-head { flex-direction: column; height: 100%; border: 0; padding: .7rem 0; gap: .6rem; align-items: center; }
  dialog.xl .rv-section.collapsed .sec-titles { writing-mode: vertical-rl; }
  dialog.xl .rv-section.collapsed .sec-titles .xs { display: none; }
  dialog.xl .rv-section.collapsed .sec-toggle { order: -1; }
  dialog.xl .rv-tabs { display: none; }
}
.sec-toggle { margin-inline-start: auto; width: 26px; height: 26px; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; color: #374151; font-size: .95rem; line-height: 1; padding: 0; display: grid; place-items: center; }
.sec-toggle:hover { background: #eef2ff; border-color: #c7d2fe; color: var(--primary); }
@media (max-width: 900px) { .sec-toggle { display: none; } }

/* מקטעים: לבן, מסגרת עדינה, בלי פסי צבע */
dialog.xl .rv-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
dialog.xl .rv-section-head { background: #fff !important; border-top: 0 !important; border-bottom: 1px solid #eef0f3; padding: .55rem .8rem; }
dialog.xl .rv-section-head .sec-num { background: #1f2937 !important; width: 22px; height: 22px; font-size: .74rem; }
dialog.xl .rv-section-head .sec-name { font-size: .95rem; font-weight: 700; color: #111827; }
dialog.xl .rv-section-body { padding: .2rem .85rem .7rem; }
/* כותרות החלונות הנפתחים — אפור בהיר, כתב כהה */
dialog.xl details > summary, dialog.xl .dfold > .dsum { background: #f8fafc !important; color: #111827 !important; border: 1px solid #e5e7eb; border-radius: 10px; font-weight: 700; }
dialog.xl details[open] > summary, dialog.xl .dfold.open > .dsum { border-radius: 10px 10px 0 0; border-bottom-color: #eef0f3; }
dialog.xl details > summary .icon, dialog.xl .dfold > .dsum .icon { color: var(--primary) !important; }
dialog.xl details > summary .muted, dialog.xl details > summary .xs, dialog.xl details > summary::after, dialog.xl details > summary::before,
dialog.xl .dfold > .dsum .xs, dialog.xl .dfold > .dsum .muted, dialog.xl .dfold > .dsum::after { color: #6b7280 !important; }
dialog.xl details > summary .chip { background: #fff; color: #374151; border: 1px solid #e5e7eb; }
dialog.xl details > summary .chip.st-approved { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
dialog.xl details > summary .chip.st-not_approved { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
dialog.xl details.fold, dialog.xl details.more-box, dialog.xl .dfold { border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; }
dialog.xl details.fold > summary, dialog.xl details.more-box > summary, dialog.xl .dfold > .dsum { border: 0; }
dialog.xl details[open].fold > summary, dialog.xl .dfold.open > .dsum { border-bottom: 1px solid #eef0f3; }
dialog.xl .fold-body { padding: .55rem .75rem .7rem; }
dialog.xl .rv-section-body > details.fold, dialog.xl .rv-section-body > details.more-box, dialog.xl .rv-section-body > .dfold { margin-top: .6rem; }
/* פרטים: ריווח נעים וקווי הפרדה בין הנושאים */
dialog.xl .sub-block { padding: .6rem 0; border-bottom: 1px solid #eef0f3; }
dialog.xl .sub-block:last-child { border-bottom: 0; }
dialog.xl .sub-block .card-head h3 { font-size: .82rem; color: #111827; font-weight: 700; }
dialog.xl .kv.kv2 { gap: .3rem .7rem; font-size: .8rem; }
dialog.xl .kv.kv2 dt { color: #6b7280; font-size: .7rem; }
dialog.xl .kv.kv2 dd { color: #111827; font-weight: 600; }
dialog.xl .offer-preview .op-insurer { color: #111827; }
dialog.xl .offer-preview .op-prices { border-top: 1px solid #eef0f3; padding-top: .45rem; }
dialog.xl .op-actions { border-top: 1px solid #eef0f3; padding-top: .5rem; }
dialog.xl .icon-btn { background: #fff; border-color: #e5e7eb; }
dialog.xl .icon-btn.primary { background: var(--primary); border-color: var(--primary); }
/* התהליך בקטן — ניטרלי */
dialog.xl .step { background: #fff; border-color: #e5e7eb; color: #6b7280; }
dialog.xl .step.ok { background: #fff; color: #047857; border-color: #d1fae5; }
dialog.xl .step.cur { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
dialog.xl .ready-item:not(.ok) { background: #fff; color: #92400e; border-color: #fde68a; }
dialog.xl .ready-item.ok { background: #fff; color: #047857; border-color: #d1fae5; }

/* ===================================================================
   פורטל — הצעת חידוש נקייה, מרווחת וברורה (offer3)
   =================================================================== */
.portal main { max-width: 760px; }
.card.offer3 { padding: 0; overflow: hidden; border-radius: 18px; border: 1px solid #e5e7eb; box-shadow: 0 8px 28px rgba(15, 23, 42, .06); }
.of-head { padding: 1.4rem 1.6rem 1.2rem; border-bottom: 1px solid #eef0f3; background: #fff; }
.of-kicker { font-size: .85rem; color: #6b7280; margin-bottom: .15rem; }
.of-insurer { font-size: 1.9rem; font-weight: 800; color: #111827; line-height: 1.15; }
.of-period { margin-top: .35rem; font-size: 1rem; color: #374151; }
.of-sec { padding: 1.25rem 1.6rem; border-bottom: 1px solid #eef0f3; background: #fff; }
.of-sec:nth-of-type(even) { background: #fafbfc; }
.of-sec:last-child { border-bottom: 0; }
.of-title { display: flex; align-items: center; gap: .55rem; margin: 0 0 .9rem; font-size: 1.08rem; font-weight: 800; color: #111827; }
.of-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #eef2ff; font-size: 1rem; }
.of-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 1.4rem; margin: 0; }
.of-fact dt { font-size: .82rem; color: #6b7280; margin-bottom: .15rem; }
.of-fact dd { margin: 0; font-size: 1.02rem; font-weight: 700; color: #111827; word-break: break-word; }
.of-drivers { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.of-drivers li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.of-drivers li b { font-size: 1rem; }
.of-drivers li span { font-size: .9rem; color: #4b5563; }
.of-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.of-reqs li { display: flex; flex-direction: column; gap: .15rem; padding: .7rem .9rem; border-inline-start: 4px solid #f59e0b; background: #fff; border-radius: 10px; border-top: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; border-inline-end: 1px solid #f3f4f6; }
.of-reqs li b { font-size: .98rem; }
.of-reqs li span { font-size: .92rem; color: #374151; }
.of-note { margin: 0; padding: 1rem 1.6rem; border-bottom: 1px solid #eef0f3; font-size: .95rem; color: #374151; }
.of-prices { display: flex; flex-direction: column; gap: .7rem; }
.of-price { border: 1px solid #e5e7eb; border-radius: 14px; padding: .85rem 1rem; background: #fff; }
.of-price-main { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.of-price-name { font-size: 1.08rem; font-weight: 800; min-width: 5rem; }
.of-sel { width: auto; min-width: 0; height: 42px; padding: 0 .7rem; font-size: 1rem; border-radius: 10px; }
.of-price-plan { color: #4b5563; font-size: .95rem; }
.of-price-end { margin-inline-start: auto; display: flex; align-items: baseline; gap: .5rem; }
.of-price-note { font-size: .8rem; color: #b45309; }
.of-price-sum { font-size: 1.35rem; color: #111827; font-variant-numeric: tabular-nums; }
.of-occ { margin-top: .75rem; padding-top: .7rem; border-top: 1px dashed #e5e7eb; }
.of-occ .occ-wrap { margin: 0; }
.of-occ .occ-wrap .btn { font-size: .88rem; padding: .35rem .8rem; }
.of-occ .occ-info { display: inline-flex; }
.of-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 1rem; padding-top: .9rem; border-top: 2px solid #111827; font-size: 1.1rem; font-weight: 800; }
.of-total-sum { font-size: 1.7rem; color: var(--primary); }
.of-hint { margin: .6rem 0 0; font-size: .85rem; color: #6b7280; }
.of-field { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: 1rem; padding: .35rem 0; margin: 0; }
.of-input { width: 8rem; height: 44px; text-align: center; font-size: 1.1rem; letter-spacing: .12rem; border-radius: 10px; }
.of-l4 { width: 6.5rem; letter-spacing: .4rem; }
.of-card { font-size: 1.3rem; letter-spacing: .3rem; }
.of-check { display: flex; align-items: flex-start; gap: .6rem; margin: .7rem 0 0; font-size: .98rem; line-height: 1.45; cursor: pointer; }
.of-check input { width: 22px; height: 22px; flex: none; margin-top: .05rem; accent-color: var(--primary); }
.of-approve { display: flex; flex-direction: column; gap: .9rem; }
.of-approve .change-box { margin: 0; }
.of-approve .change-toggle { background: #fff; border: 1px dashed #cbd5e1; color: #374151; font-size: .95rem; padding: .6rem; border-radius: 12px; }
.of-confirm { margin: 0; }
.of-approve-btn { font-size: 1.15rem; padding: .95rem; border-radius: 14px; }
.of-done-title { font-size: 1.1rem; font-weight: 800; color: #047857; margin-bottom: .4rem; }
.of-done p { margin: .25rem 0; font-size: .98rem; }
/* כרטיס פתיחה + כפתור שיחה — נקי */
.portal .card.hello { padding: 1rem 1.3rem; border-radius: 16px; }
.portal .card.hello .hello-top h1 { font-size: 1.3rem; }
.portal .hello-sub { font-size: .98rem; }
.portal .chat-toggle { padding: .85rem; font-size: 1rem; margin-top: .8rem; border-radius: 14px; border: 1px solid #c7d2fe; }
@media (max-width: 760px) {
  .portal main { padding: 0 .7rem 1.2rem; }
  .of-head { padding: 1.2rem 1.15rem 1rem; }
  .of-insurer { font-size: 1.7rem; }
  .of-sec { padding: 1.15rem 1.15rem; }
  .of-note { padding: 1rem 1.15rem; }
  .of-facts { grid-template-columns: 1fr 1fr; gap: .85rem 1rem; }
  .of-fact dt { font-size: .85rem; }
  .of-fact dd { font-size: 1.05rem; }
  .of-price-main { gap: .6rem; }
  .of-price-name { width: 100%; }
  .of-sel { flex: 1 1 auto; height: 46px; font-size: 1.05rem; }
  .of-price-end { margin-inline-start: 0; }
  .of-price-sum { font-size: 1.3rem; }
  .of-field { flex-wrap: wrap; }
  .of-check { font-size: 1rem; }
}
dialog.xl .rv-head { padding-inline-end: 4.2rem; }
.of-drivers:first-child { margin-top: 0; }

/* סמלי שליחה קטנים בכותרת "הצעת חידוש" (משמאל) */
.head-icons { display: flex; gap: .3rem; margin-inline-start: auto; }
.head-icon { width: 28px; height: 28px; padding: 0; border-radius: 8px; border: 1px solid #e5e7eb; background: #fff; display: grid; place-items: center; color: #374151; }
.head-icon .icon { width: 15px; height: 15px; }
.head-icon.wa { color: #16a34a; }
.head-icon.mail { color: #ea4335; }
.head-icon:hover:not(:disabled) { background: #f8fafc; border-color: #c7d2fe; }
.head-icon:disabled { opacity: .35; cursor: not-allowed; }
dialog.xl .op-actions { justify-content: flex-start; }
dialog.xl .op-actions .icon-btn { flex-direction: row; gap: .3rem; min-width: 0; padding: .2rem .6rem; font-size: .78rem; border-radius: 8px; }
dialog.xl .op-actions .icon-btn span { font-size: .78rem; }

/* ===================================================================
   חלון החידוש — פונטים גדולים וברורים (לבקשת המשתמש) + שדות מותאמים
   =================================================================== */
dialog.xl { font-size: 16px; }
dialog.xl .rv-section-body { overflow-y: auto !important; }
dialog.xl .rv-head .title h2 { font-size: 1.45rem; }
dialog.xl .rv-head .title .sub { font-size: .98rem; }
dialog.xl .rv-head select, dialog.xl .rv-head .status-select { height: 42px; font-size: 1.02rem; padding: .2rem .7rem; }
dialog.xl .rv-section-head .sec-name { font-size: 1.2rem; }
dialog.xl .rv-section-head .sec-num { width: 28px; height: 28px; font-size: .9rem; }
dialog.xl .step { font-size: .85rem; padding: .15rem .6rem .15rem .25rem; }
dialog.xl .step i { width: 18px; height: 18px; font-size: .7rem; }
dialog.xl details > summary, dialog.xl .dfold > .dsum { font-size: 1.05rem; min-height: 46px; padding: 0 .9rem; }
dialog.xl details > summary .chip { font-size: .82rem; }
dialog.xl .sub-block { padding: .8rem 0; }
dialog.xl .sub-block .card-head h3 { font-size: 1.05rem; }
dialog.xl .card-head .btn-sm { font-size: .9rem; padding: .25rem .65rem; }
dialog.xl .kv.kv2 { font-size: 1.02rem; gap: .5rem .9rem; }
dialog.xl .kv.kv2 dt { font-size: .88rem; }
dialog.xl .kv.kv2 dd { font-size: 1.02rem; }
dialog.xl .phone-row { font-size: 1.02rem; }
dialog.xl .client-mail { font-size: .95rem; }
/* עריכת פרטים — שדות גדולים */
dialog.xl .edit-compact { gap: .55rem .8rem; }
dialog.xl .edit-compact .field label { font-size: .88rem; }
dialog.xl .edit-compact input, dialog.xl .edit-compact select { height: 42px; font-size: 1rem; padding: .3rem .6rem; }
dialog.xl .grid2 input, dialog.xl .grid2 select, dialog.xl .grid2 textarea { font-size: 1rem; }
/* הצעה */
dialog.xl .offer-preview .op-insurer { font-size: 1.3rem; }
dialog.xl .offer-preview .xs { font-size: .88rem; }
dialog.xl .offer-preview .kv.kv2 { font-size: 1rem; }
dialog.xl .offer-preview .op-price { font-size: 1.05rem; }
dialog.xl .op-req { font-size: .95rem; padding: .35rem .6rem; }
dialog.xl .op-choice, dialog.xl .approved-line { font-size: .9rem !important; }
dialog.xl .op-actions .icon-btn, dialog.xl .op-actions .icon-btn span { font-size: .95rem; padding: .35rem .8rem; }
.head-icons { gap: .4rem; }
dialog.xl .head-icon { width: 36px; height: 36px; border-radius: 10px; }
dialog.xl .head-icon .icon { width: 19px; height: 19px; }
/* השלמת החידוש */
dialog.xl .ready-list { font-size: .92rem; }
dialog.xl .upload-line select, dialog.xl .upload-line .btn { height: 40px; font-size: .98rem; }
dialog.xl .fold-body .btn-sm, dialog.xl .fold-body .btn { font-size: .92rem; padding: .3rem .75rem; }
dialog.xl .doc-row { font-size: .98rem; padding: .4rem .5rem; }
dialog.xl .warn-box, dialog.xl .err-box { font-size: .92rem; }
dialog.xl .check-line { font-size: .95rem; }
/* שיחה */
dialog.xl .s-docs .msg { font-size: 1rem; padding: .55rem .8rem; line-height: 1.5; }
dialog.xl .s-docs .msg .meta { font-size: .78rem; }
dialog.xl .s-docs .msg .xs { font-size: .8rem; }
dialog.xl .s-docs .composer textarea { font-size: 1rem; min-height: 48px; height: 48px; }
dialog.xl .s-docs .composer button { font-size: .98rem; padding: .45rem .9rem; }

/* טופס הצעת החידוש — פונטים ושדות גדולים */
dialog:has(.offer-form) { width: min(980px, calc(100vw - 1rem)); }
dialog:has(.offer-form) .dlg-body { max-height: 82vh; overflow-y: auto; padding: 1rem 1.2rem .8rem; }
dialog:has(.offer-form) .dlg-body > h2 { font-size: 1.35rem; }
.offer-form .sec-title { font-size: 1.05rem; margin: .7rem 0 .5rem; }
.offer-form .field > label, .offer-form .price-row .bold { font-size: .9rem; margin-bottom: .2rem; }
.offer-form input[type=text], .offer-form input[type=number], .offer-form input[type=date], .offer-form select { height: 44px; font-size: 1.05rem; padding: .3rem .65rem; }
.offer-grid { gap: .7rem .9rem; }
.offer-form .check-pill { font-size: .95rem; padding: .3rem .8rem; }
.need-chk, .need-date { font-size: .95rem; }
.need-date input[type=date] { width: 160px; }
.offer-form .price-row { padding: .6rem .8rem; gap: .5rem .8rem; }
.offer-form .price-note { font-size: .88rem; }
.btn-icon-send { min-width: 54px; height: 44px; }
dialog:has(.offer-form) .dlg-actions button { font-size: 1.02rem; }
/* פונטים גדולים: חלון רחב יותר, זוג אחד בשורה, כותרת מסודרת */
@media (min-width: 1201px) { dialog.xl { width: max(80vw, min(94vw, 1150px)); height: max(86vh, min(92vh, 700px)); } }
dialog.xl .kv.kv2 { grid-template-columns: minmax(7rem, auto) minmax(0, 1fr); }
dialog.xl .kv.kv2 dd { word-break: normal; overflow-wrap: anywhere; }
dialog.xl .rv-head { flex-wrap: wrap; row-gap: .4rem; }
dialog.xl .rv-head .stepper { order: 10; flex-basis: 100%; max-width: none; justify-content: flex-start; }
dialog.xl .rv-head .head-field { flex: none; }
dialog.xl .rv-head .status-select { min-width: 170px; }

/* ===== פורטל: התוכן מתחת לפס הסגול (לא עליו) ===== */
.portal-head { padding: .9rem 1rem; }
.portal main { margin: 1rem auto 0 !important; }

/* ===== פורטל: כותרת כל פרק — פס כחול נייבי בהיר עם כתב לבן ===== */
.offer3 .of-title { background: #34497a; color: #fff; margin: -.3rem -.4rem 1rem; padding: .6rem .9rem; border-radius: 10px; font-size: 1.05rem; }
.offer3 .of-title .of-ico { background: rgba(255,255,255,.16); width: 30px; height: 30px; }
@media (max-width: 760px) { .offer3 .of-title { margin: -.2rem -.2rem .9rem; } }

/* ===== נהג מזדמן + מחירים ותנאים: שורה אחת, שני כפתורים זהים ומודגשים ===== */
.of-occ .occ-wrap, .of-occ .occ-wrap.small, .of-occ .occ-wrap.touch { display: flex !important; flex-wrap: nowrap; gap: .6rem; width: 100%; }
.of-occ .occ-wrap > .btn, .of-occ .occ-wrap > a.btn, .of-occ .occ-wrap > button { flex: 1 1 0; min-width: 0; display: inline-flex !important; align-items: center; justify-content: center;
  height: 44px; padding: 0 .6rem; font-size: .98rem; font-weight: 800; border-radius: 12px; white-space: nowrap; }
.of-occ .occ-wrap > a.btn { background: #34497a; border-color: #34497a; color: #fff; }
.of-occ .occ-wrap > a.btn:hover { background: #2a3c66; text-decoration: none; }
.of-occ .occ-wrap > .occ-info { background: #e0f2fe; border: 1px solid #7dd3fc; color: #075985; }
@media (max-width: 420px) { .of-occ .occ-wrap > .btn, .of-occ .occ-wrap > a.btn, .of-occ .occ-wrap > button { font-size: .88rem; } }
.of-occ .occ-wrap > * { overflow: hidden; text-overflow: ellipsis; }

/* ===== פורטל: פרטי ההצעה מרוכזים למעלה (כשליש עמוד), מתחת המחיר וכל השאר ===== */
.of-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); border-bottom: 1px solid #eef0f3; }
.of-top > div:only-child { grid-column: 1 / -1; }
.of-top-side { border-inline-start: 1px solid #eef0f3; }
.of-top .of-sec { padding: .8rem 1rem; border-bottom: 0; background: #fff !important; }
.of-top-side .of-sec + .of-sec { border-top: 1px solid #eef0f3; }
.of-top .of-title { margin: 0 0 .6rem; padding: .4rem .7rem; font-size: .92rem; border-radius: 8px; }
.of-top .of-title .of-ico { width: 24px; height: 24px; font-size: .85rem; }
.of-top .of-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem .9rem; }
.of-top .of-fact dt { font-size: .76rem; margin-bottom: 0; }
.of-top .of-fact dd { font-size: .95rem; }
.of-top .of-drivers { gap: .35rem; margin: 0; }
.of-top .of-drivers li { padding: .4rem .6rem; border-radius: 9px; }
.of-top .of-drivers li b { font-size: .92rem; }
.of-top .of-drivers li span { font-size: .8rem; }
.of-top .of-reqs { gap: .35rem; }
.of-top .of-reqs li { padding: .4rem .6rem; }
.of-top .of-reqs li b { font-size: .9rem; }
.of-top .of-reqs li span { font-size: .82rem; }
.offer3 .of-head { padding: 1rem 1.3rem .9rem; }
.offer3 .of-insurer { font-size: 1.6rem; }
@media (max-width: 760px) {
  .of-top { grid-template-columns: 1fr; }
  .of-top-side { border-inline-start: 0; border-top: 1px solid #eef0f3; }
  .of-top .of-sec { padding: .8rem .9rem; }
}
.of-sec > .of-occ { margin-top: .8rem; padding-top: 0; border-top: 0; }

/* פרטי ההצעה בחלון החידוש — פרוסים לרוחב (3–4 עמודות), תווית מעל ערך */
.op-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem 1rem; margin: .6rem 0 .3rem; padding: .6rem 0; border-top: 1px solid #eef0f3; }
.op-fact { min-width: 0; }
.op-fact.wide { grid-column: 1 / -1; }
.op-fact dt { font-size: .82rem; color: #6b7280; margin-bottom: .1rem; }
.op-fact dd { margin: 0; font-size: 1rem; font-weight: 700; color: #111827; overflow-wrap: anywhere; }
dialog.xl .offer-preview .op-head { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; text-align: start; }
.op-facts { border-top: 0; margin-top: .2rem; }

/* =====================================================================
   נייד — התאמה מלאה (כל הפעולות נוחות בטלפון). בסוף הקובץ כדי לגבור על הכללים הקודמים.
   ===================================================================== */
.m-filters { display: none; }
@media (max-width: 900px) {
  /* שדות בגודל 16px לפחות — אחרת אייפון עושה זום בכל לחיצה על שדה */
  input[type=text], input[type=email], input[type=tel], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea { font-size: 16px; }
  button, .btn, a.btn { min-height: 40px; }
  .btn-sm, button.btn-sm, a.btn-sm { min-height: 36px; }
  .demo-banner { font-size: .74rem; padding: .3rem .7rem; line-height: 1.35; }
  .mobilebar { padding: .45rem .75rem; padding-top: calc(.45rem + env(safe-area-inset-top)); }
  .tabbar a { min-width: 56px; padding: .25rem .4rem; font-size: .74rem; position: relative; }
  .tabbar a .count { position: absolute; top: -2px; inset-inline-end: 6px; }
  .page-head { gap: .6rem; margin-bottom: .8rem; }
  .page-head > .row:last-child { width: 100%; }
  .page-head > .row:last-child > * { flex: 1; justify-content: center; }

  /* לוח: סרגל כלים מסודר — חיפוש ברוחב מלא, השאר שניים בשורה */
  .toolbar { padding: .6rem .7rem; gap: .45rem; }
  .toolbar .search { flex: 1 1 100%; order: -1; }
  .toolbar > select, .toolbar > button { flex: 1 1 calc(50% - .45rem); min-width: 0; width: auto; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs .tab { flex: none; }
  .m-filters { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .6rem; padding: .7rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
  .m-filters label { margin: 0; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
  .m-filters label > span { font-size: .78rem; }
  .item-card { padding: .75rem .8rem; }
  .item-card .name { font-size: 1rem; }
  .item-card .row { row-gap: .45rem; }
  .card-actions { display: inline-flex; align-items: center; gap: .35rem; }
  .card-actions .del-btn { opacity: .75; padding: .3rem .5rem; }
  .card-actions select.agent-inline { min-width: 0; max-width: 150px; font-size: 15px; height: 36px; }

  /* חלונות רגילים (טפסים): כמעט כל הרוחב, כפתורים תמיד גלויים בתחתית */
  dialog:not(.xl) { width: calc(100vw - 1rem); max-width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); border-radius: 16px; }
  dialog:not(.xl)[open] { display: flex; flex-direction: column; }
  dialog:not(.xl) .dlg-body { padding: 1rem; max-height: none; flex: 1; min-height: 0; overflow-y: auto; }
  dialog .dlg-actions { padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  dialog .dlg-actions > button { flex: 1 1 auto; min-height: 46px; font-size: 1rem; }
  .phone-edit { flex-wrap: nowrap; gap: .4rem; }
  .phone-edit select { width: 6.2rem; flex: none; }
  .phone-edit .btn-icon { flex: none; min-width: 40px; }

  /* ===== חלון החידוש בנייד: כותרת קומפקטית, כדי שרוב המסך יהיה לתוכן ===== */
  dialog.xl .rv-head { padding: .55rem .7rem .5rem; padding-inline-end: 3.4rem; gap: .4rem .5rem; row-gap: .4rem; }
  dialog.xl .rv-head > .type-ico { display: none; }
  dialog.xl .rv-head .title { flex: 1 1 100%; min-width: 0; }
  dialog.xl .rv-head .title h2 { font-size: 1.15rem; line-height: 1.25; }
  dialog.xl .rv-head .title .sub { font-size: .8rem; gap: .15rem .45rem; line-height: 1.4; }
  dialog.xl .rv-head .title .sub .plate { font-size: .78rem; padding: 0 .35rem; }
  dialog.xl .rv-head .head-field { flex: 1 1 0; min-width: 0; }
  dialog.xl .rv-head .head-field > span { display: none; }
  dialog.xl .rv-head select, dialog.xl .rv-head .status-select { width: 100%; min-width: 0; height: 40px; font-size: 15px; padding: .15rem .5rem; }
  dialog.xl .rv-head > .chip { order: 9; font-size: .74rem; }
  dialog.xl .rv-head .stepper { order: 10; flex: 1 1 100%; flex-wrap: wrap; padding: .1rem 0 0; gap: .25rem; }
  dialog.xl .rv-head .step { flex: none; font-size: .7rem; padding: 0 .4rem 0 .15rem; white-space: nowrap; }
  dialog.xl .rv-head .step i { width: 15px; height: 15px; font-size: .58rem; }
  dialog.xl .rv-close { top: .5rem; left: .55rem; width: 2.4rem; height: 2.4rem; }
  dialog.xl .rv-tabs { display: flex; padding: .4rem .6rem; gap: .35rem; position: relative; z-index: 1; }
  dialog.xl .rv-tabs button { min-height: 40px; padding: .3rem .4rem; font-size: .92rem; font-weight: 600; }
  dialog.xl .rv-body { padding: .55rem; }
  dialog.xl .rv-section { border-radius: 12px; }
  dialog.xl .rv-section-head { padding: .45rem .7rem; }
  dialog.xl .rv-section-head .sec-titles .xs.muted { display: none; }
  dialog.xl .rv-section-body { padding: 0 .7rem .7rem; }
  dialog.xl .kv.kv2 { grid-template-columns: minmax(5.5rem, auto) minmax(0, 1fr); gap: .4rem .7rem; }
  dialog.xl .op-facts { grid-template-columns: 1fr 1fr; }
  /* שיחה: ממלאת את המסך, תיבת הכתיבה למטה */
  dialog.xl .rv-chat.show, dialog.xl .s-docs.show { min-height: 100%; }
  .composer textarea { font-size: 16px; }
  .msg { max-width: 92%; }
}
@media (max-width: 380px) {
  .m-filters { grid-template-columns: 1fr; }
  .card-actions select.agent-inline { max-width: 120px; }
  dialog.xl .rv-tabs button { font-size: .85rem; }
}

/* =====================================================================
   נייד בלבד: כותרות פרקים בתכלת נעים עם כתב שחור (רק פס הכותרת — לא כל הרקע). במחשב — בלי שינוי.
   ===================================================================== */
:root { --sky: #d6ecfb; --sky-2: #e7f4fd; --sky-line: #b7dbf3; --sky-ink: #0f172a; }
@media (max-width: 900px) {
  /* חלון החידוש — כותרת המקטע */
  dialog.xl .rv-section { border: 1px solid var(--sky-line); box-shadow: 0 2px 6px rgba(14, 116, 184, .07); overflow: hidden; background: #fff !important; }
  dialog.xl .rv-section-head { background: var(--sky) !important; border-bottom: 1px solid var(--sky-line) !important; color: var(--sky-ink); }
  dialog.xl .rv-section-head .sec-name { color: var(--sky-ink) !important; font-weight: 800; }
  dialog.xl .rv-section-head .sec-num { background: var(--sky-ink) !important; color: #fff !important; }
  /* חלונות נפתחים */
  dialog.xl details > summary, dialog.xl .dfold > .dsum { background: var(--sky-2) !important; color: var(--sky-ink) !important; }
  dialog.xl details > summary .icon, dialog.xl .dfold > .dsum .icon { color: #0c4a6e !important; }
  dialog.xl details.fold, dialog.xl details.more-box, dialog.xl .dfold { border-color: var(--sky-line); background: #fff; }
  /* נושאים בתוך המקטע (לקוח / פוליסה / פרטי רכב) — פס כותרת בלבד */
  dialog.xl .sub-block > .card-head { background: var(--sky-2); border: 1px solid var(--sky-line); border-radius: 8px; padding: .25rem .4rem .25rem .7rem; margin-bottom: .55rem; min-height: 36px; }
  dialog.xl .sub-block > .card-head h3 { color: var(--sky-ink) !important; font-weight: 800; }
  dialog.xl .sub-block > .card-head .btn-ghost, dialog.xl .sub-block > .card-head button { background: #fff; color: var(--sky-ink); border: 1px solid var(--sky-line); min-height: 32px; padding: .1rem .6rem; border-radius: 7px; }
  /* טופס ההצעה */
  .offer-form .sec-title { background: var(--sky); color: var(--sky-ink); border: 0 !important; border-radius: 8px; padding: .45rem .8rem !important; margin: 1rem 0 .7rem !important; font-weight: 800; }
  .offer-form .sec-title:first-child { margin-top: .2rem !important; }
  /* תיק לקוח / ניהול / משימות — פס כותרת הכרטיס */
  body:not(.portal) .card > .card-head:has(> h2), body:not(.portal) .card > h2:first-child { background: var(--sky); color: var(--sky-ink); margin: -1.1rem -1.1rem .9rem; padding: .6rem .9rem; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--sky-line); }
  body:not(.portal) .card.flush > .card-head:has(> h2), body:not(.portal) .card.flush > h2:first-child { margin: 0 0 .5rem; }
  body:not(.portal) .section-head { background: var(--sky); padding: .5rem .6rem .5rem .9rem; border-radius: 12px; border: 1px solid var(--sky-line); }

  /* ===== דף הבית (לוח) בנייד — צבעים נעימים ===== */
  body:not(.portal) { background: #f2f7fc; }
  .mobilebar { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%) !important; box-shadow: 0 2px 8px rgba(30, 58, 138, .25); }
  .mobilebar button { border-color: rgba(255,255,255,.45) !important; }
  .page-head h1 { color: #0f2a5c; }
  .kpi { border: 1px solid #dbe7f3; box-shadow: 0 1px 3px rgba(15, 42, 92, .06); }
  .kpis .kpi:nth-child(1) { background: linear-gradient(135deg, #eef2ff, #fff); }
  .kpis .kpi:nth-child(2) { background: linear-gradient(135deg, #f1f5f9, #fff); }
  .kpis .kpi:nth-child(3) { background: linear-gradient(135deg, #e0ecff, #fff); }
  .kpis .kpi:nth-child(4) { background: linear-gradient(135deg, #ccfbf1, #fff); }
  .kpis .kpi:nth-child(5) { background: linear-gradient(135deg, #fef3c7, #fff); }
  .kpis .kpi:nth-child(6) { background: linear-gradient(135deg, #d1fae5, #fff); }
  .kpis .kpi:nth-child(7) { background: linear-gradient(135deg, #fee2e2, #fff); }
  .kpi.active { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79, 70, 229, .25); }
  .card.flush { border-color: #dbe7f3; }
  .card.flush > .toolbar:first-child { background: var(--sky-2); }
  .item-card { background: #fff; border: 1px solid #dbe7f3; border-inline-start: 4px solid #94a3b8; box-shadow: 0 1px 3px rgba(15, 42, 92, .06); }
  .item-card.cs-in_progress { border-inline-start-color: #3b82f6; }
  .item-card.cs-approved { border-inline-start-color: #14b8a6; }
  .item-card.cs-not_approved { border-inline-start-color: #f59e0b; }
  .item-card.cs-renewed { border-inline-start-color: #10b981; }
  .item-card.cs-lost { border-inline-start-color: #ef4444; }
  .item-card.mark-unread { border-inline-start-color: #ef4444; }
  .item-card.mark-approved { border-inline-start-color: #10b981; }
  .item-card.mark-protect { border-inline-start-color: #111827; }
  .tabbar { box-shadow: 0 -2px 10px rgba(15, 42, 92, .08); }
  .tabbar a.active { background: var(--sky-2); color: #1d4ed8; }
}

/* ===================================================================
   שדות במסגרות (חלון החידוש וחלונות פרטים): תווית — מסגרת צהובה נעימה, ערך — מסגרת לבנה. כל השדות באותו גודל
   =================================================================== */
:root { --fld-label-bg: #fff6d6; --fld-label-bd: #f3dc8a; --fld-label-fg: #6b5300; --fld-val-bd: #e2e8f0; }
/* פרטי ההצעה (op-facts): תווית מעל ערך, תיבות ברוחב ובגובה זהים */
.op-facts { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: .55rem .6rem; }
.op-fact { display: flex; flex-direction: column; }
.op-fact dt, .op-fact dd { box-sizing: border-box; display: flex; align-items: center; padding: 0 .6rem; margin: 0; }
.op-fact dt { height: 30px; background: var(--fld-label-bg); border: 1px solid var(--fld-label-bd); border-bottom: 0; border-radius: 9px 9px 0 0; color: var(--fld-label-fg); font-size: .82rem; font-weight: 600; }
.op-fact dd { min-height: 42px; background: #fff; border: 1px solid var(--fld-val-bd); border-radius: 0 0 9px 9px; font-size: 1rem; font-weight: 700; color: #111827; }
.op-fact.wide dd { min-height: 42px; }
/* פרטים בזוגות (kv2) בחלונות: תווית | ערך — שתי מסגרות באותו גובה, עמודת תווית ברוחב קבוע */
dialog .kv.kv2 { grid-template-columns: 9.5rem minmax(0, 1fr) !important; gap: .4rem .35rem !important; align-items: stretch; }
dialog .kv.kv2 dt, dialog .kv.kv2 dd { box-sizing: border-box; min-height: 42px; display: flex; align-items: center; padding: .25rem .65rem; margin: 0; border-radius: 9px; }
dialog .kv.kv2 dt { background: var(--fld-label-bg); border: 1px solid var(--fld-label-bd); color: var(--fld-label-fg) !important; font-size: .85rem !important; font-weight: 600; white-space: normal; }
dialog .kv.kv2 dd { background: #fff; border: 1px solid var(--fld-val-bd); color: #111827; font-size: 1rem !important; font-weight: 700; }
dialog .kv.kv2 dd .plate { font-size: .95rem; }

/* טלפון הסוכנות בראש דף הלקוח */
.portal-head .agency-phone { color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .15rem .75rem; white-space: nowrap; }
.portal-head .agency-phone:hover { background: rgba(255,255,255,.28); }
.portal-head .agency-phone.hidden { display: none !important; }
/* אישור חידוש בשיחה — כפתור ירוק עדין */
.icon-btn.ok { border-color: #16a34a; color: #15803d; }
.icon-btn.ok span { color: #15803d; }
.icon-btn.ok:hover { background: #f0fdf4; }

/* ===================================================================
   שאלון הצעת ביטוח רכב (public/quote-form.js) — משותף לנציג וללקוח
   =================================================================== */
.qf-step { display: flex; flex-direction: column; gap: 1.15rem; }
.qf-q { display: flex; flex-direction: column; gap: .4rem; }
.qf-label { font-weight: 700; font-size: 1rem; color: var(--text); }
.qf-hint { font-size: .82rem; color: var(--muted); }
.qf-err { font-size: .85rem; color: var(--danger); font-weight: 500; min-height: 0; }
.qf-err:empty { display: none; }
.qf-q.bad input:not([type=checkbox]), .qf-q.bad select, .qf-q.bad textarea { border-color: var(--danger); }
.qf-q.bad .qf-chips { border-radius: 12px; box-shadow: 0 0 0 2px var(--danger-soft); }
.qf-q input[type=text], .qf-q input[type=email], .qf-q input[type=tel], .qf-q input[type=date], .qf-q select, .qf-q textarea { min-height: 46px; font-size: 1rem; }
.qf-date { max-width: 220px; letter-spacing: .06em; }
.qf-q.qf-t-number input { max-width: 140px; }
.qf-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.qf-chip { white-space: normal; text-align: right; min-width: 0; display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .5rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text); font-weight: 500; font-size: .98rem; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.qf-chip:hover { border-color: #b8c2dc; background: #fff; }
.qf-chip:active { transform: scale(.98); }
.qf-chip .qf-tick { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #c3c9d8; flex: none; transition: all .15s; }
.qf-chip[role=checkbox] .qf-tick { border-radius: 5px; }
.qf-chip.on { border-color: var(--qf-accent, #34497a); background: var(--qf-accent-soft, #eef1f8); color: var(--qf-accent, #34497a); }
.qf-chip.on .qf-tick { border-color: var(--qf-accent, #34497a); background: var(--qf-accent, #34497a); box-shadow: inset 0 0 0 3px #fff; }
.qf-chips.many { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.qf-step, .qf-q { min-width: 0; }
.qf-check { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 500; line-height: 1.45; }
.qf-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qf-check .qf-box { width: 22px; height: 22px; flex: none; border: 2px solid #c3c9d8; border-radius: 6px; margin-top: 1px; transition: all .15s; position: relative; }
.qf-check:has(input:checked) { border-color: var(--qf-accent, #34497a); background: var(--qf-accent-soft, #eef1f8); }
.qf-check input:checked + .qf-box { background: var(--qf-accent, #34497a); border-color: var(--qf-accent, #34497a); }
.qf-check input:checked + .qf-box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.qf-check input:focus-visible + .qf-box { box-shadow: 0 0 0 3px rgba(52,73,122,.25); }
.qf-plate-wrap { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.qf-q input.qf-plate { font-size: 1.35rem; min-height: 52px; max-width: 220px; }
.qf-car { font-size: .92rem; color: var(--muted); }
.qf-car.ok { color: var(--ok); font-weight: 700; background: var(--ok-soft); padding: .35rem .75rem; border-radius: 999px; animation: qfPop .35s ease; }
.qf-car.wait { color: var(--muted); }
@keyframes qfPop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.qf-named { display: flex; flex-direction: column; gap: .75rem; }
.qf-driver { border: 1.5px solid var(--line); border-radius: 14px; padding: .85rem 1rem 1rem; background: #fbfcfe; }
.qf-driver-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.qf-me { font-size: .85rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--qf-accent, #34497a); color: var(--qf-accent, #34497a); background: #fff; }
.qf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.qf-sub { display: flex; flex-direction: column; gap: .3rem; font-size: .86rem; color: var(--muted); font-weight: 500; }
.qf-sub input, .qf-sub select { min-height: 44px; font-size: 1rem; color: var(--text); }
.qf-claims { display: flex; flex-direction: column; gap: .5rem; }
.qf-claim-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border: 1.5px solid var(--line); border-radius: 12px; padding: .5rem .5rem .5rem 1rem; padding-inline-start: 1rem; background: #fff; max-width: 360px; }
.qf-year { font-weight: 700; }
.qf-stepper { display: flex; align-items: center; gap: .3rem; }
.qf-stepper button { width: 40px; height: 40px; border-radius: 10px; padding: 0; font-size: 1.3rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.qf-num { min-width: 2rem; text-align: center; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .qf-grid { grid-template-columns: 1fr; } .qf-chips.many { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ----- הנציג: טופס אחד, פשוט, לפי נושאים ----- */
dialog:has(.qf-agent) { width: min(860px, calc(100vw - 1rem)); }
dialog:has(.qf-agent) .dlg-body { max-height: 78vh; }
.qf-agent { display: flex; flex-direction: column; gap: 1.1rem; }
.qf-agent .qf-sec { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.qf-agent .qf-sec > h3 { margin: 0; padding: .6rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: 1rem; }
.qf-agent .qf-sec > .qf-step { padding: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.25rem; }
.qf-agent .qf-t-named, .qf-agent .qf-t-multi, .qf-agent .qf-t-check, .qf-agent .qf-t-textarea, .qf-agent .qf-t-claims, .qf-agent .qf-t-plate, .qf-agent .qf-t-choice:has(.many) { grid-column: 1 / -1; }
.qf-agent .qf-chip { min-height: 40px; padding: .35rem .8rem; font-size: .92rem; }
.qf-agent .qf-label { font-size: .92rem; }
.qf-client-pick { display: flex; flex-direction: column; gap: .5rem; border: 1px dashed #c7cfe2; border-radius: 14px; padding: .8rem 1rem; background: #f8f9fd; }
.qf-client-pick .row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.qf-client-results { display: flex; flex-direction: column; gap: .25rem; max-height: 220px; overflow-y: auto; }
.qf-client-results button { text-align: right; justify-content: flex-start; display: flex; gap: .6rem; }
.qf-picked { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
@media (max-width: 900px) { .qf-agent .qf-sec > .qf-step { grid-template-columns: 1fr; } }

/* ----- מסך "הצעות חדשות" ----- */
.qs-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.qs-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.qs-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .9rem; }
.qs-tabs button { border-radius: 999px; padding: .35rem .9rem; font-size: .9rem; display: inline-flex; gap: .4rem; align-items: center; }
.qs-tabs button.on { background: #34497a; border-color: #34497a; color: #fff; }
.qs-tabs .n { font-weight: 800; font-variant-numeric: tabular-nums; }
.qs-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.qs-table th, .qs-table td { white-space: nowrap; padding: .6rem .75rem; text-align: right; border-bottom: 1px solid var(--line-2); font-size: .92rem; }
.qs-table th { background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: .82rem; }
.qs-table tr.qrow { cursor: pointer; }
.qs-table tr.qrow:hover td { background: #f7f8fc; }
.qs-table tr.fresh td:first-child { box-shadow: inset -4px 0 0 #16a34a; }
.chip.q-sent { background: #eef2ff; color: #4338ca; }
.chip.q-pending { background: #fff4e5; color: #b45309; }
.chip.q-converted { background: var(--ok-soft); color: var(--ok); }
.chip.q-cancelled { background: #f1f2f5; color: var(--muted); }
.q-src { font-size: .78rem; color: var(--muted); }
.q-miss { color: var(--danger); font-size: .82rem; font-weight: 500; }
.q-cards { display: none; }
@media (max-width: 900px) {
  .qs-table { display: none; }
  .q-cards { display: flex; flex-direction: column; gap: .6rem; }
  .q-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .8rem 1rem; display: flex; flex-direction: column; gap: .35rem; cursor: pointer; }
  .q-card .top { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
}
.q-view .q-sec { margin-bottom: 1rem; }
.q-view .q-sec h3 { margin: 0 0 .4rem; font-size: .95rem; color: #34497a; }
.q-view .q-rows { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.q-view .q-rows > div { padding: .5rem .75rem; border-bottom: 1px solid var(--line-2); font-size: .93rem; white-space: pre-line; }
.q-view .q-rows > .l { background: var(--fld-label-bg, #fff8e1); color: #4b5563; }
.q-view .q-rows > .v { font-weight: 500; }
.q-view .q-rows > .v.empty { color: var(--faint); font-weight: 400; }
.q-view .q-top { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.q-view .q-missing { background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
.q-view .q-link { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; background: #eef2ff; border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1rem; }
.q-view .q-link input { flex: 1; min-width: 200px; direction: ltr; font-size: .85rem; }

/* ===================================================================
   דף השאלון ללקוח (/q/...) — מרשים, נקי, נייד קודם
   =================================================================== */
body.quote {
  --qf-accent: #2f4a8a; --qf-accent-soft: #edf1fa;
  --qp-ink: #14213d; --qp-deep: #1f2f5c; --qp-glow: #f2b33d;
  background: #f3f5fa; color: var(--qp-ink); font-size: 16px;
}
body.quote .qp-top { background: var(--qp-deep); color: #fff; position: sticky; top: 0; z-index: 5; padding-top: env(safe-area-inset-top, 0px); }
body.quote .qp-top-in { max-width: 760px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem max(16px, env(safe-area-inset-left, 0px)); }
.qp-brand { font-weight: 800; font-size: 1.05rem; letter-spacing: .01em; }
.qp-phone { color: #fff; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; background: rgba(255,255,255,.12); border-radius: 999px; padding: .3rem .8rem; font-size: .92rem; }
.qp-phone:hover { text-decoration: none; background: rgba(255,255,255,.2); }
.qp-phone .icon { width: 16px; height: 16px; }
.qp-main { max-width: 760px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)) calc(2.5rem + env(safe-area-inset-bottom, 0px)); }

/* פתיחה */
.qp-hero { margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); background: linear-gradient(160deg, var(--qp-deep) 0%, #2c4685 55%, #3a5aa3 100%); color: #fff; position: relative; overflow: hidden; }
.qp-hero::before { content: ""; position: absolute; inset: auto -20% -55% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,179,61,.28), transparent); pointer-events: none; }
.qp-hero-in { position: relative; padding: 2.2rem max(20px, env(safe-area-inset-left, 0px)) 2.4rem; display: flex; flex-direction: column; gap: 1.1rem; animation: qpRise .6s ease both; }
.qp-eyebrow { margin: 0; color: var(--qp-glow); font-weight: 700; font-size: .9rem; letter-spacing: .04em; }
.qp-hero h1 { font-size: clamp(1.6rem, 5.5vw, 2.3rem); line-height: 1.2; font-weight: 800; text-wrap: balance; max-width: 22ch; }
.qp-lead { margin: 0; font-size: 1.08rem; line-height: 1.6; opacity: .92; max-width: 46ch; }
.qp-perks { list-style: none; margin: .3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.qp-perks li { display: flex; gap: .6rem; align-items: center; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: .75rem .8rem; }
.qp-perks li > span { display: flex; flex-direction: column; line-height: 1.3; }
.qp-perks b { font-size: .98rem; }
.qp-perks span span { font-size: .84rem; opacity: .8; }
.qp-perks .icon { width: 26px; height: 26px; color: var(--qp-glow); }
.qp-go { align-self: flex-start; display: inline-flex; align-items: center; gap: .7rem; background: var(--qp-glow); color: var(--qp-ink); border: 0; border-radius: 14px; padding: .95rem 1.7rem; font-size: 1.15rem; font-weight: 800; box-shadow: 0 10px 30px rgba(242,179,61,.35); transition: transform .15s, box-shadow .15s; }
.qp-go:hover { background: #f6c25e; transform: translateY(-1px); box-shadow: 0 14px 34px rgba(242,179,61,.45); }
.qp-arrow { font-size: 1.2rem; transition: transform .2s; }
.qp-go:hover .qp-arrow, .qp-next:hover .qp-arrow { transform: translateX(-4px); }
.qp-safe { margin: 0; display: flex; align-items: center; gap: .45rem; font-size: .85rem; opacity: .75; }
.qp-safe .icon { width: 15px; height: 15px; }
@media (max-width: 600px) { .qp-perks { grid-template-columns: 1fr; } .qp-go { align-self: stretch; justify-content: center; } }

/* התקדמות */
.qp-progress { padding: 1.2rem 0 .9rem; }
.qp-bar { height: 6px; background: #dfe4f0; border-radius: 999px; overflow: hidden; }
.qp-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--qp-glow), #2f4a8a); border-radius: 999px; transition: width .45s cubic-bezier(.2,.8,.2,1); }
.qp-dots { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; justify-content: space-between; gap: .25rem; }
.qp-dots li { display: flex; flex-direction: column; align-items: center; gap: .25rem; flex: 1; min-width: 0; color: #8a93ab; font-size: .76rem; }
.qp-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e3e8f2; font-weight: 800; font-size: .8rem; transition: all .25s; }
.qp-dot-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.qp-dots li.done .qp-dot { background: #2f4a8a; color: #fff; }
.qp-dots li.cur { color: var(--qp-ink); font-weight: 700; }
.qp-dots li.cur .qp-dot { background: var(--qp-glow); color: var(--qp-ink); box-shadow: 0 0 0 4px rgba(242,179,61,.25); }
@media (max-width: 560px) { .qp-dot-t { display: none; } .qp-dots li.cur .qp-dot-t { display: none; } }

/* כרטיס שלב */
.qp-card { background: #fff; border-radius: 22px; box-shadow: 0 1px 2px rgba(20,33,61,.05), 0 12px 40px rgba(20,33,61,.08); padding: 1.5rem 1.4rem 1.2rem; }
.qp-card.slide-f { animation: qpSlideF .38s ease both; }
.qp-card.slide-b { animation: qpSlideB .38s ease both; }
.qp-card-head { margin-bottom: 1.3rem; }
.qp-count { font-size: .82rem; font-weight: 700; color: #2f4a8a; letter-spacing: .03em; }
.qp-step-title { font-size: 1.55rem; font-weight: 800; margin: .15rem 0 .2rem; color: var(--qp-ink); }
.qp-step-sub { margin: 0; color: #64708a; }
.qp-form-err { margin-top: 1rem; background: var(--danger-soft); color: var(--danger); border-radius: 12px; padding: .7rem 1rem; font-weight: 500; }
.qp-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-top: 1.6rem; padding-top: 1.1rem; border-top: 1px solid #eef0f6; }
.qp-back { border: 0; background: none; color: #64708a; font-weight: 500; padding: .7rem .4rem; }
.qp-back:hover { background: none; color: var(--qp-ink); }
.qp-back.invisible { visibility: hidden; }
.qp-next { display: inline-flex; align-items: center; gap: .6rem; background: #2f4a8a; color: #fff; border: 0; border-radius: 14px; padding: .85rem 1.6rem; font-size: 1.08rem; font-weight: 800; min-height: 52px; transition: background .15s, transform .1s; }
.qp-next:hover { background: #253d75; }
.qp-next:active { transform: scale(.98); }
.qp-next.send { background: #16a34a; box-shadow: 0 10px 26px rgba(22,163,74,.3); }
.qp-next.send:hover { background: #12873d; }
.qp-spin { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: qpSpin .8s linear infinite; }
body.quote .qf-q input, body.quote .qf-q select, body.quote .qf-q textarea { border-radius: 12px; border: 1.5px solid #d9deea; font-size: 1.05rem; }
body.quote .qf-q input:focus, body.quote .qf-q select:focus, body.quote .qf-q textarea:focus { border-color: #2f4a8a; box-shadow: 0 0 0 4px rgba(47,74,138,.12); }
body.quote .qf-q input.plate-input { border: 2px solid #ca8a04 !important; }
body.quote .qf-label { font-size: 1.05rem; }
@media (max-width: 600px) {
  .qp-card { border-radius: 18px; padding: 1.2rem 1rem 1rem; }
  .qp-step-title { font-size: 1.35rem; }
  .qp-nav { position: sticky; bottom: 0; background: #fff; margin: 1.2rem -1rem -1rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom, 0px)); border-radius: 0 0 18px 18px; box-shadow: 0 -6px 18px rgba(20,33,61,.06); }
  .qp-next { flex: 1; justify-content: center; }
}

/* תודה */
.qp-done { text-align: center; padding: 2.6rem 0 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; animation: qpRise .5s ease both; }
.qp-done h1 { font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 800; color: var(--qp-ink); text-wrap: balance; }
.qp-done .qp-lead { color: #46516b; opacity: 1; }
.qp-check svg { width: 92px; height: 92px; }
.qp-check circle { fill: #e9f8ef; stroke: #16a34a; stroke-width: 2.5; stroke-dasharray: 152; stroke-dashoffset: 152; animation: qpDraw .6s ease forwards; }
.qp-check path { fill: none; stroke: #16a34a; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: qpDraw .4s .5s ease forwards; }
.qp-next-steps { list-style: none; counter-reset: s; margin: .6rem 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; width: 100%; max-width: 440px; text-align: right; }
.qp-next-steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; column-gap: .8rem; align-items: center; background: #fff; border-radius: 14px; padding: .75rem 1rem; box-shadow: 0 1px 2px rgba(20,33,61,.05), 0 6px 20px rgba(20,33,61,.05); }
.qp-next-steps li::before { content: counter(s); grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #edf1fa; color: #2f4a8a; font-weight: 800; }
.qp-next-steps span { color: #64708a; font-size: .9rem; }
.qp-call { display: inline-flex; align-items: center; gap: .5rem; background: #2f4a8a; color: #fff; border-radius: 14px; padding: .8rem 1.4rem; font-weight: 700; }
.qp-call:hover { text-decoration: none; background: #253d75; }
.qp-sign { color: #8a93ab; font-weight: 700; margin: .4rem 0 0; }

@keyframes qpRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes qpSlideF { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes qpSlideB { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes qpDraw { to { stroke-dashoffset: 0; } }
@keyframes qpSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .qp-hero-in, .qp-done, .qp-card.slide-f, .qp-card.slide-b, .qf-car.ok { animation: none; } .qp-check circle, .qp-check path { animation: none; stroke-dashoffset: 0; } .qp-bar-fill { transition: none; } }
@media (min-width: 761px) {
  .qp-hero { margin: 1.6rem 0 0; border-radius: 26px; box-shadow: 0 20px 50px rgba(31,47,92,.25); }
  .qp-hero-in { padding: 2.8rem 2.6rem 2.6rem; }
}
/* רשימת יישובים נפתחת (שאלון ההצעה) */
.qf-ac-wrap { position: relative; }
.qf-ac { position: absolute; inset-inline: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1.5px solid #d9deea; border-radius: 12px; box-shadow: 0 14px 34px rgba(20,33,61,.16); overflow: hidden; max-height: 320px; overflow-y: auto; }
.qf-ac-item { display: block; width: 100%; text-align: right; border: 0; border-radius: 0; background: #fff; padding: .75rem 1rem; font-size: 1.02rem; min-height: 46px; border-bottom: 1px solid #f0f2f7; }
.qf-ac-item:last-child { border-bottom: 0; }
.qf-ac-item:hover, .qf-ac-item.on { background: #edf1fa; color: #2f4a8a; }
.qf-ac-empty { padding: .8rem 1rem; color: var(--muted); font-size: .92rem; }

/* ===== דף ההצעה ללקוח: כיסויים כלולים, הפרטים שמסר הלקוח, שיחה עם הנציג ===== */
.of-addons { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.of-addons li { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1px solid #d1fae5; background: #f0fdf6; border-radius: 12px; font-size: 1rem; font-weight: 600; color: #064e3b; }
.of-addon-tick { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #059669; color: #fff; display: grid; place-items: center; font-size: .85rem; font-weight: 800; }
.of-addons-note { margin: .8rem 0 0; font-size: .95rem; color: #374151; }
@media (max-width: 560px) { .of-addons { grid-template-columns: 1fr; } }
.of-answers details > summary { cursor: pointer; list-style: none; margin: 0; }
.of-answers details > summary::-webkit-details-marker { display: none; }
.of-answers details > summary::after { content: "▾"; margin-inline-start: auto; color: #6b7280; font-size: .95rem; transition: transform .2s; }
.of-answers details[open] > summary::after { transform: rotate(180deg); }
.of-answers details[open] > summary { margin-bottom: .6rem; }
.of-ans-group { margin-top: .9rem; }
.of-ans-group h4 { margin: 0 0 .35rem; font-size: .9rem; color: #34497a; }
.of-ans { margin: 0; border: 1px solid #eef0f3; border-radius: 12px; overflow: hidden; }
.of-ans > div { display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); gap: .8rem; padding: .55rem .85rem; border-bottom: 1px solid #f3f4f6; }
.of-ans > div:nth-child(even) { background: #fafbfc; }
.of-ans > div:last-child { border-bottom: 0; }
.of-ans dt { color: #6b7280; font-size: .9rem; }
.of-ans dd { margin: 0; font-weight: 600; font-size: .95rem; white-space: pre-line; overflow-wrap: break-word; }
.of-contact { border: 1px solid #dbe3f3; background: #f5f8fe; border-radius: 14px; padding: .9rem 1rem; margin-bottom: .9rem; display: flex; flex-direction: column; gap: .65rem; }
.of-contact-t { font-weight: 700; color: #1f2f5c; }
.of-contact-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.of-contact-btns .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; font-weight: 700; font-size: 1rem; border-radius: 12px; text-decoration: none; }
.of-call { background: #34497a; color: #fff; border-color: #34497a; }
.of-call:hover { background: #2a3c66; color: #fff; }
.of-wa { background: #fff; color: #128c4b; border: 1.5px solid #25d366; }
.of-wa:hover { background: #f0fdf4; color: #128c4b; }
/* טופס ההצעה: מה הלקוח מילא בשאלון */
.offer-quote { border: 1px solid #c7d2fe; background: #f5f7ff; border-radius: 12px; padding: .6rem .85rem; margin-bottom: .6rem; }
.offer-quote > summary { cursor: pointer; font-weight: 700; color: #3730a3; display: flex; align-items: center; gap: .45rem; }
.offer-quote[open] > summary { margin-bottom: .55rem; }
.oq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .55rem .9rem; margin-bottom: .4rem; }
.oq-sec { background: #fff; border: 1px solid #e0e7ff; border-radius: 10px; padding: .45rem .65rem; min-width: 0; }
.oq-title { font-size: .8rem; font-weight: 700; color: #4338ca; margin-bottom: .2rem; }
.oq-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, max-content); gap: .6rem; font-size: .86rem; padding: .15rem 0; border-bottom: 1px dashed #eef0f6; }
.oq-row:last-child { border-bottom: 0; }
.oq-l { color: #6b7280; min-width: 0; }
.oq-v { font-weight: 600; text-align: left; white-space: pre-line; max-width: 22ch; overflow-wrap: break-word; }
input.user-phone { width: 140px; padding: .3rem .5rem; font-size: .85rem; }
/* חלון החידוש: פרטים מהשאלון (לקוח חדש) — שדות רגילים לפי נושאים */
.quote-card .card-head { gap: .5rem; flex-wrap: wrap; }
.quote-card .quote-sec + .quote-sec { margin-top: .6rem; }
.quote-card .quote-sec .sec-title { font-size: .85rem; color: var(--muted); font-weight: 700; margin: .2rem 0 .35rem; }
.quote-card dd { white-space: pre-line; }

/* ===== פורטל: שדות במסגרות — תווית במסגרת צהובה נעימה, ערך במסגרת לבנה, כולם באותו גודל ===== */
.offer3 .of-facts { gap: .5rem .55rem; }
.offer3 .of-fact { display: flex; flex-direction: column; min-width: 0; }
.offer3 .of-fact dt, .offer3 .of-fact dd { box-sizing: border-box; display: flex; align-items: center; margin: 0; padding: 0 .65rem; }
.offer3 .of-fact dt { height: 30px; background: var(--fld-label-bg, #fff6d6); border: 1px solid var(--fld-label-bd, #f3dc8a); border-bottom: 0; border-radius: 9px 9px 0 0; color: var(--fld-label-fg, #6b5300); font-size: .82rem; font-weight: 600; }
.offer3 .of-fact dd { min-height: 44px; background: #fff; border: 1px solid var(--fld-val-bd, #e2e8f0); border-radius: 0 0 9px 9px; font-size: 1rem; font-weight: 700; color: #111827; }
.offer3 .of-drivers li { border-color: var(--fld-label-bd, #f3dc8a); }
.offer3 .of-drivers li b { background: var(--fld-label-bg, #fff6d6); margin: -.7rem -.9rem .35rem; padding: .35rem .9rem; border-radius: 12px 12px 0 0; color: var(--fld-label-fg, #6b5300); }
@media (max-width: 760px) { .offer3 .of-drivers li b { margin: -.7rem -.9rem .35rem; } }
.of-top .of-drivers li b { margin: -.4rem -.6rem .25rem !important; padding: .25rem .6rem !important; border-radius: 9px 9px 0 0 !important; }
.nb-chip { margin-inline-start: .5rem; background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; font-size: .78rem; vertical-align: middle; }
.qs-tabs .qs-proc { border-color: #c4b5fd; }

/* ===== שורות פנימיות בשיחה (מסמכים לחברת הביטוח / פרטים להפקה) — קטנות ואפורות, לא נשלחות ללקוח ===== */
.timeline .msg.task-line { align-self: stretch; max-width: 100%; background: #f3f4f6; border: 1px dashed #d1d5db; color: #374151; box-shadow: none; font-size: .8rem; padding: 6px 10px; border-radius: 8px; }
.timeline .msg.task-line .meta { color: #6b7280; font-size: .72rem; }
.task-row { cursor: pointer; align-items: center; gap: 10px; }
.task-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
.task-row .chip { margin-inline-start: 8px; }
.secret-val { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.secret-val .reveal-btn { min-height: 0; padding: 2px 10px; font-size: .78rem; }
.bank-grid { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 10px; }
@media (max-width: 600px) { .bank-grid { grid-template-columns: 1fr 1fr; } .bank-grid > :last-child { grid-column: 1 / -1; } }

/* ===== מסמכים נדרשים: מהלקוח / הסוכנות, תאריך אחרון, "הועבר לחברת הביטוח" ===== */
.req-title { gap: 6px; align-items: center; flex-wrap: wrap; }
.req-title .chip { font-size: .72rem; padding: 1px 8px; }
.sent-line { margin-top: 6px; gap: 6px; color: #374151; }
.sent-line input { width: 18px; height: 18px; }
.sent-line.disabled { opacity: .55; }
.doc-row.req.sent { background: #f0fdf4; }
.req-row-head { gap: 10px; flex-wrap: wrap; }
.req-row .from-client { color: #374151; }
.req-migun { gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.req-migun input[type="date"] { max-width: 180px; }
.req-due { color: #b45309; font-weight: 600; }
