:root {
  --bg: #f5f3f8;
  --card: #ffffff;
  --ink: #1d1530;
  --muted: #6e6680;
  --line: #e6e1ee;
  --brand: #c400c4;
  --brand-ink: #ffffff;
  --brand-soft: #fbe6fb;
  --night: #1a1030;
  --ok: #138a4b;
  --ok-soft: #e3f5ea;
  --warn: #b86e00;
  --warn-soft: #fff1d9;
  --bad: #c62828;
  --bad-soft: #fde7e7;
  --radius: 14px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Heebo', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--brand); }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- התחברות ---------- */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 30% 20%, #4a1c6b 0%, var(--night) 60%);
}
.login-card {
  background: var(--card); border-radius: 22px; padding: 36px 28px; width: 100%; max-width: 360px;
  text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.login-logo { font-size: 56px; line-height: 1; }
.login h1 { margin: 10px 0 0; font-size: 26px; font-weight: 800; }
.login-error { color: var(--bad); background: var(--bad-soft); padding: 10px; border-radius: 10px; font-size: 14px; margin: 14px 0 0; }
.name-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 50vh; overflow-y: auto; }
.name-btn { padding: 14px 8px; border-radius: 12px; border: 1px solid var(--line); background: #faf8fc; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; color: var(--ink); }
.name-btn:active { background: var(--brand-soft); }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; padding: 0; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.pin-dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand); transition: background .1s; }
.pin-dots span.on { background: var(--brand); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; direction: ltr; }
.pin-pad button { height: 58px; border-radius: 14px; border: 0; background: #f1edf6; font: inherit; font-size: 24px; font-weight: 600; cursor: pointer; color: var(--ink); }
.pin-pad button:active { background: var(--brand-soft); }
.perm-group { margin-top: 12px; }
.perm-group h3 { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.perm-item { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; font-weight: 500; color: var(--ink); font-size: 14px; margin: 0; }
.perm-item input { width: 20px; height: 20px; accent-color: var(--brand); flex-shrink: 0; margin-top: 1px; }
.perm-item small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.perm-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ---------- מבנה ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: var(--night); color: #fff;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 10px; width: 36px; height: 36px; font-size: 18px; cursor: pointer; }
.user-chip { font-size: 12px; background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.env-banner { background: #fff1d9; color: #7a4a00; text-align: center; font-size: 12px; font-weight: 600; padding: 6px 12px; }

.view { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 24px); }

.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-around;
  background: var(--card); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b); height: calc(var(--nav-h) + var(--safe-b));
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 500;
}
.nav a .ico { font-size: 20px; line-height: 1; filter: grayscale(1); opacity: .7; }
.nav a.active { color: var(--brand); }
.nav a.active .ico { filter: none; opacity: 1; }

/* ---------- רכיבים ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; border: 1px solid var(--line); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; color: inherit; display: block; }
.kpi b { display: block; font-size: 26px; font-weight: 800; line-height: 1.1; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.alert b { color: var(--warn); }
button.kpi { font: inherit; text-align: right; cursor: pointer; width: 100%; }

/* משוב */
.fb { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: #fff; }
.fb.open { border-color: #f0c675; background: #fffaf0; }
.fb-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-head .btn, .fb-head .badge { margin-inline-start: auto; }
.fb-text { white-space: pre-wrap; margin-top: 4px; font-size: 14px; }

/* יומן */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head h2 { margin: 0; }
.icon-btn.dark { background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; text-decoration: none; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-grid > * { min-width: 0; }
.cal-dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.cal-cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0; color: var(--ink);
}
.cal-cell.empty { border: 0; background: transparent; cursor: default; }
.cal-cell .num { font-size: 14px; font-weight: 500; }
.cal-cell.has { background: var(--brand-soft); border-color: transparent; }
.cal-cell.has .num { font-weight: 700; color: var(--brand); }
.cal-cell.today { outline: 2px solid var(--night); outline-offset: -2px; }
.cal-cell.sel { background: var(--brand); border-color: var(--brand); }
.cal-cell.sel .num { color: #fff; }
.cal-count { font-size: 10px; font-weight: 700; line-height: 1; min-width: 16px; padding: 2px 4px; border-radius: 99px; background: var(--brand); color: #fff; }
.cal-count.waiting { background: var(--warn); }
.cal-cell.sel .cal-count { background: #fff; color: var(--brand); }
input:disabled, select:disabled { background: #f4f2f7; color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.item {
  display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 13px; color: var(--muted); }
.date-box { width: 46px; flex-shrink: 0; text-align: center; background: var(--brand-soft); color: var(--brand); border-radius: 10px; padding: 4px 0; line-height: 1.15; }
.date-box b { display: block; font-size: 17px; }
.date-box span { font-size: 11px; }
.date-box.none { background: #eee; color: #999; }
.chev { color: var(--muted); }

.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eee; color: #555; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }

.empty { text-align: center; color: var(--muted); padding: 18px 8px; font-size: 14px; }

/* ---------- טפסים ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--ink); font-size: 15px; margin: 10px 0; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px 18px; border-radius: 12px; border: 0; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 15px; text-decoration: none;
  background: var(--brand); color: var(--brand-ink);
}
.btn:disabled { opacity: .5; cursor: default; }
.btn.secondary { background: var(--brand-soft); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.wa { background: #25d366; color: #fff; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn-row .btn { flex: 1; min-width: 140px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip.on { background: var(--night); color: #fff; border-color: var(--night); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

.note-box { white-space: pre-wrap; background: #faf8fc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13px; max-height: 220px; overflow-y: auto; }

.crew-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.crew-row .grow { flex: 1; min-width: 0; }

.options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; max-height: 220px; overflow-y: auto; background: #faf8fc; border-radius: 10px; padding: 6px 10px; border: 1px solid var(--line); }
.options-grid .check { font-size: 13px; margin: 6px 0; }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }

/* פרוטוקול */
.photo-block { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.photo-block .grow { flex: 1; }
.photo-block img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.photo-block input[type=file] { display: none; }
.progress-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 0; }
.progress-bar div { height: 100%; background: var(--brand); transition: width .2s; }
.report-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.report-photos figure { margin: 0; }
.report-photos img { width: 100%; border-radius: 10px; display: block; }
.report-photos figcaption { font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- טעינה והודעות ---------- */
.busy { position: fixed; inset: 0; z-index: 50; background: rgba(26,16,48,.55); display: grid; place-content: center; justify-items: center; color: #fff; gap: 12px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--brand); width: 30px; height: 30px; border-width: 3px; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; z-index: 60; left: 16px; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  max-width: 480px; margin: 0 auto; padding: 12px 16px; border-radius: 12px;
  background: var(--night); color: #fff; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  pointer-events: none; /* לא חוסם לחיצות על כפתורים שמתחתיו */
}
.toast.bad { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ---------- בקשות, אישורים, יומן שינויים ---------- */
.card.attention { border: 2px solid var(--brand); background: #fff7ff; }
.warn-text { color: var(--warn); font-weight: 600; margin: 6px 0 0; }
.fb-actions { display: flex; gap: 14px; margin-top: 6px; }
.danger-link { color: var(--bad) !important; }
.req-item .req-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--brand-soft); display: grid; place-items: center; font-size: 18px; }
.req-item.urgent .req-ico { background: var(--bad-soft); }
.req-head.urgent { border: 2px solid var(--bad); }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 12px 8px; border-radius: 12px; border: 1px solid var(--line); background: #faf8fc; font-weight: 600; color: var(--ink); font-size: 15px; }
.seg input:checked + span { background: var(--night); color: #fff; border-color: var(--night); }
.decide { border: 2px solid var(--brand); }
.btn.approve { background: var(--ok); color: #fff; }
.thread { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.msg { max-width: 85%; align-self: flex-start; background: #f1edf6; border-radius: 14px 14px 14px 4px; padding: 8px 12px; }
.msg.me { align-self: flex-end; background: var(--brand-soft); border-radius: 14px 14px 4px 14px; }
.msg.decision { border: 2px solid var(--ok); background: var(--ok-soft); }
.msg-meta { font-size: 11px; color: var(--muted); }
.msg-text { white-space: pre-wrap; font-size: 14px; }
.confirm-card.pending { border: 2px solid var(--warn); background: #fffaf0; }
.hist { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.hist:last-child { border-bottom: 0; }
details > summary { cursor: pointer; list-style-position: inside; }
.report-row { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.report-row.miss { color: var(--bad); font-weight: 600; }

/* יומן: ימים חסומים */
.cal-cell.blocked { background: repeating-linear-gradient(-45deg, var(--bad-soft), var(--bad-soft) 4px, #fff 4px, #fff 8px); border-color: #f3b4b4; }
.cal-cell.blocked .num { color: var(--bad); text-decoration: line-through; }
.cal-cell.past { opacity: .55; }
.cal-off { font-size: 9px; line-height: 1; color: var(--bad); }
.block-mode { border: 2px dashed var(--bad); }

/* עורך צ'קליסט */
.cl-row { display: grid; grid-template-columns: 110px 1fr; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cl-row .cl-note { grid-column: 1 / -1; font-size: 14px; padding: 8px 10px; }
.cl-row .cl-btns { grid-column: 1 / -1; display: flex; gap: 6px; justify-content: flex-end; }
.cl-row select, .cl-row input { padding: 9px 10px; font-size: 15px; }

/* ================= עיצוב מותג — כמו טופס ההצעה והפרוטוקול הקיימים ================= */
:root {
  --brand: #d600d6;          /* המגנטה של הכלים הקיימים (#ff00ff בהדגשות) */
  --brand-hot: #ff00ff;
  --brand-soft: rgba(255, 0, 255, .1);
  --card: rgba(255, 255, 255, .84);
  --line: rgba(0, 0, 0, .12);
  --bg: #2a1a33;
}
body { background: var(--bg); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1;
  background: url('assets/bg.jpg') center / cover no-repeat;
  opacity: .5;
}
.card, .kpi {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.card h2 { border-bottom: 3px solid var(--brand-hot); padding-bottom: 8px; }
.card-head h2 { border-bottom: 0; padding-bottom: 0; }
.card.attention { border: 2px solid var(--brand-hot); background: rgba(255, 247, 255, .9); }
.topbar { background: rgba(26, 16, 48, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 3px solid var(--brand-hot); }
.btn.secondary { background: rgba(255, 240, 255, .94); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.btn.ghost { background: rgba(255, 255, 255, .85); }
.nav { background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.login { background: transparent; }
.login-card { background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.login h1 { border-bottom: 3px solid var(--brand-hot); display: inline-block; padding-bottom: 6px; }
.view > .muted, .view > p.small { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
/* מצב פיתוח: הקוד מוצג מתחת לשם */
.name-btn[data-pin]::after { content: "קוד " attr(data-pin); display: block; font-size: 12px; font-weight: 400; color: var(--muted); direction: ltr; }

/* ---------- דף לקוח: פרטי אירוע ---------- */
.client-view { padding-bottom: 32px; max-width: 560px; }
.client-head { text-align: center; }
.client-head h1 { margin: 6px 0 0; font-size: 24px; font-weight: 800; border-bottom: 3px solid var(--brand-hot); display: inline-block; padding-bottom: 4px; }
.cf-field { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cf-field:last-of-type { border-bottom: 0; }
.cf-label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 4px; color: var(--ink); }
.cf-field input, .cf-field textarea { margin-top: 6px; }
.cf-field.locked .cf-value { color: var(--ink); white-space: pre-wrap; }
.cf-field.locked .cf-label { color: var(--muted); font-weight: 600; font-size: 13px; }
.cf-lock { font-size: 11px; opacity: .7; }
.cf-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.cf-progress { height: 8px; border-radius: 99px; background: rgba(0,0,0,.08); overflow: hidden; margin-top: 12px; }
.cf-progress span { display: block; height: 100%; background: var(--brand-hot); border-radius: 99px; transition: width .4s; }
.cf-saved { background: var(--ok-soft); color: var(--ok); padding: 10px 12px; border-radius: 10px; font-weight: 700; margin: 12px 0 0; }

/* מתג רשימה / חודש בעמוד האירועים */
.view-switch { display: flex; gap: 4px; padding: 4px; margin-bottom: 12px; border-radius: 14px; background: rgba(255,255,255,.85); box-shadow: 0 4px 14px rgba(0,0,0,.15); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.view-switch a { flex: 1; text-align: center; padding: 9px 8px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
.view-switch a.on { background: var(--night); color: #fff; }

/* ---------- קומפקטי: מסך אירוע ובית ---------- */
.card { padding: 12px 14px; margin-bottom: 10px; }
.card h2 { font-size: 16px; padding-bottom: 6px; margin-bottom: 8px; }
.card-head { margin-bottom: 6px; }
.item { padding: 8px 0; gap: 10px; }
.date-box { width: 42px; padding: 3px 0; }
.date-box b { font-size: 15px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(88px, 1fr)); gap: 8px; margin-bottom: 10px; }
.kpi { padding: 8px 10px; }
.kpi b { font-size: 22px; }
.kpi span { font-size: 11.5px; }
.crew-row { padding: 6px 0; }
.kv-compact { grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 14px; margin: 0; }
.kv-compact dt { font-size: 13px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip-btn { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 99px; border: 1px solid var(--line);
  background: rgba(255,255,255,.9); color: var(--ink); text-decoration: none; cursor: pointer; line-height: 1.2; }
.chip-btn.wa { background: #25D366; border-color: #25D366; color: #fff; }
.chip-btn.brand { background: var(--night, #1a1030); border-color: transparent; color: #fff; }
.crew-add { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px; margin-top: 8px; }
.inline-edit { display: flex; gap: 6px; align-items: center; }
.inline-edit input { padding: 6px 8px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; border-bottom: 0; padding-bottom: 0; flex: 1; }
details.fold > summary::after { content: "‹"; transform: rotate(-90deg); color: var(--muted); font-size: 18px; transition: transform .2s; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold[open] > summary { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 3px solid var(--brand-hot); }
.more-link { display: block; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 0 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inline-edit .btn { flex: none; white-space: nowrap; min-width: 0; }
.kpi { display: flex; align-items: center; gap: 8px; padding: 8px 10px; min-height: 0; }
.kpi b { font-size: 20px; flex: none; }
.kpi span { font-size: 12px; line-height: 1.25; }
.kpis { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.sign-pad { width: 100%; height: auto; aspect-ratio: 600 / 250; background: #fff; border: 2px dashed var(--line); border-radius: 12px; touch-action: none; display: block; margin-top: 6px; }
/* אירוע פתוח (עוד לא נסגר) — אפור */
.item.is-open { opacity: .55; }
.item.is-open .date-box { background: #e9e7ee; color: #8a8496; }
.item.is-open .title { font-weight: 500; }
.cal-count.open { background: #bdb8c6; color: #fff; }

/* ---------- תמחורים ליד ההצעה ---------- */
.quote-layout { display: block; }
@media (min-width: 900px) {
  .quote-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; align-items: start; }
  .quote-layout > .price-panel { order: 2; position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
}
details.price-panel > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.price-panel > summary::-webkit-details-marker { display: none; }
details.price-panel > summary h2 { margin: 0; border-bottom: 0; padding-bottom: 0; flex: 1; }
details.price-panel[open] > summary { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 3px solid var(--brand-hot); }
.pp-sec { margin-bottom: 8px; }
.pp-sec-title { font-weight: 700; font-size: 13px; color: var(--muted); margin: 6px 0 2px; }
.pp-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.pp-row input { width: auto; margin-top: 3px; flex: none; }
.pp-label { flex: 1; min-width: 0; }
.pp-price { font-weight: 700; white-space: nowrap; font-size: 13px; text-align: left; }
.pp-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.pp-flag { font-size: 11px; color: var(--muted); background: rgba(0,0,0,.05); padding: 1px 6px; border-radius: 99px; }
.pp-flag.on { color: var(--ok); background: var(--ok-soft); }
.pp-note { display: block; }
.pp-cost { padding: 4px 0 6px 24px; }
.pp-result { margin-top: 8px; padding: 10px; border-radius: 12px; background: var(--brand-soft); }
.pp-total { font-size: 20px; font-weight: 800; margin-top: 4px; }
.pp-price { white-space: normal; max-width: 42%; }
