/* קליטת הוצאות – מערכת עיצוב
   ירוק פנקסים כצבע ראשי, צהוב-חרדל למה שמחכה לטיפול, ותגית "שדרת קלסר" עם מספר הלקוח
   שחוזרת בכל מסך, כמו הקלסרים הממוספרים במשרד. */
:root {
  --bg: #f4f5fb;
  --card: #ffffff;
  --sunk: #f7f7fc;
  --ink: #161433;
  --ink-2: #3a3860;
  --muted: #6b6a8a;
  --line: #e6e6f2;
  --line-2: #d4d3e6;

  --pine: #5b3df5;          /* ראשי: סגול חשמלי */
  --pine-ink: #ffffff;
  --pine-deep: #15123a;     /* תפריט צד ופס עליון */
  --pine-soft: #eeeaff;

  --mustard: #c77700;       /* דורש תשומת לב */
  --mustard-soft: #fff3dc;
  --mustard-line: #ffd98a;
  --red: #d6334a;
  --red-soft: #ffeaee;
  --ok: #0f9d74;
  --ok-soft: #dcf7ee;

  /* צבעי שלבי החודש: רכים, רק כדי להבדיל ביניהם */
  --s-waiting: #ffe6ea;      --s-waiting-ink: #b4233a;     --s-waiting-bar: #e0697b;
  --s-partial: #fff0d6;      --s-partial-ink: #9a5b00;     --s-partial-bar: #e0a54e;
  --s-client_done: #e2f0ff;  --s-client_done-ink: #145fb5; --s-client_done-bar: #6a9ad6;
  --s-in_progress: #efe9ff;  --s-in_progress-ink: #5a34d6; --s-in_progress-bar: #9483e6;
  --s-ready_review: #d9f8ee; --s-ready_review-ink: #08795a;--s-ready_review-bar: #43b08e;
  --s-closed: #eceef5;       --s-closed-ink: #545a75;      --s-closed-bar: #b2b6c8;

  --grad: linear-gradient(135deg, #5b3df5 0%, #6c50f7 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22, 20, 51, .05), 0 4px 16px -6px rgba(22, 20, 51, .08);
  --shadow-lg: 0 12px 40px -12px rgba(40, 20, 120, .35);
  --font: "IBM Plex Sans Hebrew", "Segoe UI", Arial, sans-serif;
  --display: "Rubik", "IBM Plex Sans Hebrew", Arial, sans-serif;
  --side: 240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 15px; line-height: 1.55; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 4px; }
h1 { font-family: var(--display); font-size: 26px; line-height: 1.2; font-weight: 700; margin: 0; letter-spacing: -.005em; }
h2 { font-family: var(--display); font-size: 16px; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; color: var(--ink-2); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ltr, [dir=ltr] { direction: ltr; unicode-bidi: isolate; }

/* ---------- שלד: תפריט צד + תוכן ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--pine-deep); color: #cfe0d9; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; padding: 18px 12px; gap: 4px;
}
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: #fff; font-weight: 700; font-size: 16px; }
.side .brand .mark {
  width: 30px; height: 36px; border-radius: 4px 8px 8px 4px; background: #e9b949; position: relative; flex: none;
  box-shadow: inset -5px 0 0 rgba(0,0,0,.12);
}
.side .brand .mark::after { content: ""; position: absolute; inset-inline-start: 50%; top: 7px; width: 7px; height: 7px; margin-inline-start: -3px; border-radius: 50%; background: var(--pine-deep); }
.side .brand small { display: block; font-weight: 400; font-size: 12px; color: #9fbcb1; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #d4e4dd; font-weight: 500;
}
.side nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.side nav a:hover { background: rgba(255,255,255,.07); text-decoration: none; color: #fff; }
.side nav a.on { background: #fff; color: var(--pine-deep); }
.side nav a.on svg { opacity: 1; }
.side nav .count {
  margin-inline-start: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: #e9b949; color: #3d2a00; text-align: center; line-height: 20px;
}
.side .me { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side .me b { color: #fff; font-weight: 600; display: block; }
.side .me a { color: #9fbcb1; margin-inline-start: auto; }
.side .me a:hover { color: #fff; }

main { padding: 28px 32px 72px; max-width: 1360px; width: 100%; margin: 0 auto; }
body.bare main { max-width: 980px; }

/* ראש עמוד */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .titles { display: flex; align-items: center; gap: 14px; min-width: 0; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- תגית שדרת קלסר ---------- */
.spine {
  --c: var(--s-closed-bar);
  display: inline-flex; align-items: center; justify-content: center; position: relative;
  min-width: 52px; height: 30px; padding: 0 8px 0 10px; border-radius: 3px 7px 7px 3px;
  background: var(--card); border: 1px solid var(--line-2); border-inline-start: 5px solid var(--c);
  font-weight: 700; font-size: 14px; color: var(--ink); letter-spacing: .02em; direction: ltr;
}
.spine.lg { min-width: 78px; height: 52px; font-size: 22px; border-inline-start-width: 8px; border-radius: 4px 10px 10px 4px; }
.spine.lg::before { content: ""; position: absolute; top: 7px; inset-inline-end: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); }
.spine.s-waiting { --c: var(--s-waiting-bar); } .spine.s-partial { --c: var(--s-partial-bar); }
.spine.s-client_done { --c: var(--s-client_done-bar); } .spine.s-in_progress { --c: var(--s-in_progress-bar); }
.spine.s-ready_review { --c: var(--s-ready_review-bar); } .spine.s-closed { --c: var(--s-closed-bar); }
.spine.s-waiting, .spine.s-partial, .spine.s-client_done, .spine.s-in_progress, .spine.s-ready_review, .spine.s-closed { background: var(--card); }

/* ---------- כרטיסים ומבנה ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.col { flex: 1 1 360px; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.split > *, .approve > *, .shell > * { min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---------- טבלאות ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 500; color: var(--muted); font-size: 13px; background: var(--sunk); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: left; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--ink); background: var(--sunk); }
tbody tr.hover:hover td { background: #f8faf9; }
tr.muted td { color: var(--muted); }

/* ---------- תגיות סטטוס ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--sunk); color: var(--ink-2); line-height: 22px;
}
a.pill:hover { text-decoration: none; filter: brightness(.97); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill.plain::before { display: none; }
.s-waiting { background: var(--s-waiting); color: var(--s-waiting-ink); }
.s-partial { background: var(--s-partial); color: var(--s-partial-ink); }
.s-client_done { background: var(--s-client_done); color: var(--s-client_done-ink); }
.s-in_progress { background: var(--s-in_progress); color: var(--s-in_progress-ink); }
.s-ready_review { background: var(--s-ready_review); color: var(--s-ready_review-ink); }
.s-closed { background: var(--s-closed); color: var(--s-closed-ink); }
.d-pending { background: #eef1f0; color: var(--muted); }
.d-needs_review { background: var(--mustard-soft); color: #7a5000; }
.d-approved { background: var(--ok-soft); color: var(--ok); }
.d-other { background: var(--s-client_done); color: var(--s-client_done-ink); }
.d-rejected { background: var(--red-soft); color: var(--red); }
.tag { display: inline-block; font-size: 12px; padding: 0 8px; border-radius: 6px; background: var(--sunk); border: 1px solid var(--line); color: var(--muted); line-height: 20px; white-space: nowrap; }
.tag.alert { background: var(--red-soft); border-color: #f6c7c1; color: var(--red); font-weight: 600; }
.tag.warn { background: var(--mustard-soft); border-color: var(--mustard-line); color: #7a5000; }
.flag { color: var(--red); font-weight: 600; }

/* ---------- כפתורים ושדות ---------- */
button, .btn {
  font: inherit; font-weight: 500; border: 1px solid var(--line-2); background: var(--card); color: var(--ink);
  padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  line-height: 1.4; white-space: nowrap; transition: background-color .12s, border-color .12s;
}
button:hover, .btn:hover { background: var(--sunk); border-color: #b5c0bb; text-decoration: none; }
button.primary, .btn.primary { background: var(--pine); color: var(--pine-ink); border-color: var(--pine); }
button.primary:hover, .btn.primary:hover { background: #17493b; }
button.ok, .btn.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
button.ok:hover { background: #0d5c40; }
button.ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
button.ghost:hover, .btn.ghost:hover { background: rgba(23,36,31,.06); }
button.danger { color: var(--red); }
button.link { border: none; background: none; color: var(--pine); padding: 0; font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.sm, .btn.sm { padding: 4px 10px; font-size: 13px; }
button.lg, .btn.lg { padding: 11px 20px; font-size: 16px; font-weight: 600; }
button.block { width: 100%; justify-content: center; }
button svg, .btn svg { width: 16px; height: 16px; flex: none; }
.btn-group { display: inline-flex; }
.btn-group > .btn, .btn-group > button { border-radius: 0; margin-inline-start: -1px; }
.btn-group > :first-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-inline-start: 0; }
.btn-group > :last-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
form.inline { display: inline; }

input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff;
  color: var(--ink); max-width: 100%; transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(30, 91, 74, .15); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--pine); vertical-align: -3px; margin: 0 0 0 6px; }
input[type=number], input.ltr { direction: ltr; text-align: left; }
input:disabled, select:disabled { background: var(--sunk); color: var(--muted); }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
label.check { display: inline-flex; align-items: center; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.field { margin-bottom: 12px; }
.field input, .field select, .field textarea { width: 100%; }
.field input[type=checkbox] { width: 16px; }
b.ltr { word-break: break-all; }
.field.uncertain input, .field.uncertain select { background: var(--mustard-soft); border-color: #e2b13c; }
.field.uncertain label { color: #7a5000; }
.field.uncertain label .tag { margin-inline-start: 6px; }
.field.big input { font-size: 20px; font-weight: 700; padding: 8px 12px; }

/* ---------- הודעות מערכת ---------- */
.flash {
  position: fixed; bottom: 24px; inset-inline-start: calc(var(--side) + 24px); z-index: 50;
  background: var(--pine-deep); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease-out;
}
.flash.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.warnings { background: var(--mustard-soft); border: 1px solid var(--mustard-line); padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; color: #6a4500; }
ul.warnings { padding-inline-start: 32px; }
/* הלקוח אישר / תיקן את מה שקראנו */
.client-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; background: var(--sunk); border: 1px solid var(--line); }
.client-check .cc-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--line); color: var(--ink-2); }
.client-check.cc-confirmed .cc-ico { background: var(--ok-soft); color: var(--ok); }
.client-check.cc-corrected { background: var(--pine-soft); border-color: #dcd4ff; }
.client-check.cc-corrected .cc-ico { background: var(--pine); color: #fff; }
.warnings li { color: #6a4500; }
.callout { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- לוח "מי עוד חסר" ---------- */
.month-nav { display: inline-flex; align-items: center; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.month-nav a { display: inline-flex; padding: 6px 8px; border-radius: 7px; color: var(--ink-2); }
.month-nav a:hover { background: var(--sunk); text-decoration: none; }
.month-nav b { padding: 0 10px; font-weight: 600; min-width: 120px; text-align: center; }
.month-nav svg { width: 18px; height: 18px; }

.progress-strip { margin-bottom: 14px; }
.progress-strip .line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.progress-strip .line b { font-size: 15px; }
.stack { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); gap: 2px; }
.stack span { display: block; height: 100%; }
.stack .s-waiting { background: var(--s-waiting-bar); } .stack .s-partial { background: var(--s-partial-bar); }
.stack .s-client_done { background: var(--s-client_done-bar); } .stack .s-in_progress { background: var(--s-in_progress-bar); }
.stack .s-ready_review { background: var(--s-ready_review-bar); } .stack .s-closed { background: var(--s-closed-bar); }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 0 12px; background: var(--card); }
.tabs a {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 10px 10px; color: var(--muted); font-weight: 500; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--pine); }
.tabs a .dot { width: 8px; height: 8px; border-radius: 50%; }
.tabs a .n { font-size: 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; color: var(--ink-2); line-height: 18px; }
.tabs a.on .n { background: var(--pine); border-color: var(--pine); color: #fff; }
.dot.s-waiting { background: var(--s-waiting-bar); } .dot.s-partial { background: var(--s-partial-bar); }
.dot.s-client_done { background: var(--s-client_done-bar); } .dot.s-in_progress { background: var(--s-in_progress-bar); }
.dot.s-ready_review { background: var(--s-ready_review-bar); } .dot.s-closed { background: var(--s-closed-bar); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 320px; }
.toolbar .search input { width: 100%; padding-inline-start: 34px; }
.toolbar .search svg { position: absolute; inset-inline-start: 10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; color: var(--muted); }
.toolbar .search .kbd { position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); }
.toolbar select { padding-block: 7px; }
.chip-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 14px; color: var(--ink-2); cursor: pointer; background: #fff; margin: 0; font-weight: 500; }
.chip-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.chip-toggle:has(input:checked) { background: var(--pine-soft); border-color: var(--pine); color: var(--pine); }
.chip-toggle:has(input:focus-visible) { outline: 2px solid var(--pine); outline-offset: 2px; }

.board td { padding-block: 12px; }
.board .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.board .who .name { font-weight: 600; color: var(--ink); }
.board .who .name:hover { color: var(--pine); }
.board .who .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); font-weight: 700; font-size: 12px; flex: none; }
.person { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.meter { min-width: 140px; }
.meter .bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; display: flex; margin-top: 6px; }
.meter .bar i { display: block; height: 100%; background: var(--ok); }
.meter .bar i.rev { background: #e2b13c; }
.meter .nums { font-size: 13px; color: var(--ink-2); display: flex; gap: 8px; align-items: baseline; }
.meter .nums b { font-size: 14px; }
.meter .nums a { color: #7a5000; font-weight: 600; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
@media (hover: hover) and (min-width: 861px) {
  /* פעולות משניות מופיעות רק בשורה שמעליה העכבר, כדי שהלוח יישאר שקט */
  .board .row-actions .ghost { opacity: 0; transition: opacity .12s; }
  .board tr:hover .row-actions .ghost, .board .row-actions .ghost:focus-visible { opacity: 1; }
}

/* ---------- תיק חודשי ---------- */
.stepper { display: flex; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.stepper li { flex: 1; position: relative; padding-top: 30px; font-size: 13px; color: var(--muted); text-align: center; min-width: 0; }
.stepper li::before {
  counter-increment: step; content: counter(step); position: absolute; top: 0; inset-inline-start: 50%; transform: translateX(50%);
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--line-2); color: var(--muted);
  font-size: 12px; font-weight: 600; line-height: 18px; z-index: 1;
}
.stepper li::after { content: ""; position: absolute; top: 10px; inset-inline-start: 50%; width: 100%; height: 2px; background: var(--line-2); }
.stepper li:last-child::after { display: none; }
.stepper li.done { color: var(--ink-2); }
.stepper li.done::before { content: "✓"; background: var(--pine); border-color: var(--pine); color: #fff; }
.stepper li.done::after { background: var(--pine); }
.stepper li.now { color: var(--ink); font-weight: 600; }
.stepper li.now::before { background: var(--pine); border-color: var(--pine); color: #fff; box-shadow: 0 0 0 4px var(--pine-soft); }
.workflow { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.workflow .stepper { flex: 1 1 520px; }
.workflow .next { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.workflow-foot { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; }
.workflow-foot select { padding-block: 5px; }
.stepper li { cursor: help; }
.stepper li .by { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-help { margin: 14px 0 0; font-size: 13.5px; color: var(--ink-2); }
.stage-help b { color: var(--ink); }

/* מה קרה בתיק: ציר פעולות */
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; font-size: 14px; position: relative; }
.history li + li { border-top: 1px dashed var(--line); }
.history .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pine); align-self: center; }
.history li.sys .dot { background: var(--line-2); }
.history li.h-closed .dot { background: #1f9d6b; box-shadow: 0 0 0 3px #1f9d6b22; }
.history li.h-reopen .dot { background: #d08a00; }
.history li.h-remind .dot, .history li.h-doc .dot { width: 6px; height: 6px; opacity: .7; }
.history .txt { min-width: 0; color: var(--ink-2); }
.history .txt b { color: var(--ink); font-weight: 600; }
.history .when { font-size: 12px; color: var(--muted); white-space: nowrap; direction: ltr; }
.history-more summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 8px 0 2px; }

.vat-split { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 12px; }
.vat-split b { color: var(--ink); font-size: 15px; margin-inline-start: 4px; }

.dropzone {
  display: flex; align-items: center; gap: 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; padding: 12px 14px;
  background: var(--sunk); color: var(--muted); cursor: pointer; font-size: 14px; margin: 0 0 12px;
}
.dropzone:hover, .dropzone.over { border-color: var(--pine); background: var(--pine-soft); color: var(--pine); }
.dropzone b { color: var(--ink-2); font-weight: 600; }
.dropzone input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.dropzone svg { width: 22px; height: 22px; flex: none; }

.doclist td { white-space: nowrap; }
.doclist td:nth-child(2) { white-space: normal; }
.doclist .sup { font-weight: 600; color: var(--ink); }
.doclist .note { font-size: 12px; color: #7a5000; margin-top: 2px; }
.thumb {
  width: 44px; height: 52px; object-fit: cover; object-position: top; border-radius: 6px; border: 1px solid var(--line);
  background: var(--sunk); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--muted); font-weight: 600; vertical-align: middle;
}

.checklist { list-style: none; padding: 0; margin: 0 0 12px; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.checklist li:last-child { border-bottom: 0; }
.checklist .box {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); background: #fff; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; margin-top: 1px;
}
.checklist .box.on { background: var(--pine); border-color: var(--pine); }
.checklist .txt { flex: 1; min-width: 0; }
.checklist .done .txt { color: var(--muted); text-decoration: line-through; }
.checklist .meta { font-size: 12px; color: var(--muted); }
.checklist .del { opacity: 0; transition: opacity .12s; }
.checklist li:hover .del, .checklist .del:focus-visible { opacity: 1; }
.addline { display: flex; gap: 8px; }
.addline input { flex: 1; min-width: 0; }

.chat { max-height: 420px; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #eef2ef; border-radius: 10px; }
.bubble { max-width: 82%; padding: 7px 11px; border-radius: 12px; white-space: pre-wrap; font-size: 14px; box-shadow: 0 1px 0 rgba(0,0,0,.05); }
.bubble.in { background: #fff; align-self: flex-start; border-start-start-radius: 4px; }
.bubble.out { background: #d7f2dd; align-self: flex-end; border-start-end-radius: 4px; }
.bubble .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.months { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- מסך אישור ---------- */
.approve { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 20px; align-items: start; }
.viewer-wrap { position: sticky; top: 16px; }
.viewer {
  height: calc(100vh - 150px); background: #2b3632; border-radius: var(--radius); overflow: auto;
  display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px 16px;
}
.viewer img { max-width: 100%; transform-origin: top center; transition: transform .15s; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.viewer iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 6px; }
.viewer-tools { position: absolute; top: 12px; inset-inline-end: 12px; display: flex; gap: 4px; background: rgba(20,30,27,.82); border-radius: 10px; padding: 4px; z-index: 2; }
.viewer-tools button, .viewer-tools a { background: transparent; border: 0; color: #fff; padding: 6px 8px; border-radius: 7px; display: inline-flex; }
.viewer-tools button:hover, .viewer-tools a:hover { background: rgba(255,255,255,.14); }
.viewer-tools svg { width: 18px; height: 18px; }
.queue { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.queue .left { background: var(--mustard-soft); color: #7a5000; border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; }
.approve-bar { margin-top: 4px; display: grid; gap: 10px; }
.approve-bar .kbd { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.3); color: #fff; }
.side-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.hint { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }

.kbd { font-family: var(--font); background: #fff; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; font-size: 11px; color: var(--ink-2); direction: ltr; unicode-bidi: isolate; display: inline-block; line-height: 17px; }

details.card > summary { cursor: pointer; font-weight: 600; }
details.card[open] > summary { margin-bottom: 12px; }

/* ---------- כניסה ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login .card { width: 100%; max-width: 400px; padding: 32px; }
.login .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login .brand .mark { width: 34px; height: 42px; border-radius: 4px 9px 9px 4px; background: var(--pine); box-shadow: inset -6px 0 0 rgba(0,0,0,.15); }
.login select { width: 100%; margin-bottom: 12px; }

/* ---------- מסכים קטנים ---------- */
@media (max-width: 1100px) {
  .split, .approve { grid-template-columns: 1fr; }
  .viewer-wrap { position: relative; top: 0; }
  .viewer { height: 62vh; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  main { padding: 14px 14px calc(120px + env(safe-area-inset-bottom, 0px)); }
  .flash { inset-inline-start: 16px; inset-inline-end: 16px; }
  h1 { font-size: 21px; }
  .grid2 { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
  .page-head .actions { width: 100%; }
  .btn-group { flex-wrap: wrap; }
  .stepper li { font-size: 0; }
  .stepper li.now { font-size: 12px; }
  .stepper li:not(.now) .by { display: none; }
  /* הלוח הופך לכרטיסים */
  .board thead { display: none; }
  .board, .board tbody, .board tr, .board td { display: block; width: 100%; }
  .board tr { padding: 12px 14px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; }
  .board td { padding: 0; border: 0; }
  .board td.c-who { grid-column: 1 / -1; }
  .board td.c-person { display: none; }
  .board td.c-actions { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; }
  .meter { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .side, .no-print, .flash { display: none !important; }
  .shell { display: block; }
  body { background: #fff; }
  main { padding: 0; }
  .card { border: none; padding: 0; box-shadow: none; }
}
.d-block { display: block; }

/* ================= סבב 2: מסך הפתיחה ================= */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.hello h1 { font-size: 30px; letter-spacing: -.01em; }
.hello .today { color: var(--muted); font-size: 14px; margin-bottom: 2px; min-height: 22px; }

.lanes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.lane { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }
.lane:nth-child(1) { border-top: 4px solid #e2b13c; }
.lane:nth-child(2) { border-top: 4px solid var(--s-waiting-bar); }
.lane:nth-child(3) { border-top: 4px solid var(--s-ready_review-bar); }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 6px; }
.lane-head h2 { margin: 0; font-size: 15px; }
.lane-n { font-size: 26px; font-weight: 700; line-height: 1; color: var(--ink); }
.lane ul { list-style: none; margin: 0; padding: 4px 10px 8px; flex: 1; }
.lane li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; min-height: 46px; }
.lane li:hover { background: var(--sunk); }
.lane li .nm { flex: 1; min-width: 0; color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lane li .spine { min-width: 46px; height: 26px; font-size: 13px; }
.lane li.none { color: var(--muted); font-size: 14px; justify-content: center; padding: 18px 8px; }
.lane li.none:hover { background: none; }
.lane-more { display: block; width: 100%; padding: 11px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); text-align: center; background: var(--sunk); }
.lane-more.as-btn { border: 0; border-top: 1px solid var(--line); border-radius: 0; color: var(--pine); font-weight: 600; justify-content: center; }
.lane-more.as-btn:hover { background: var(--pine-soft); }
.lane-more.as-btn:disabled { color: var(--muted); cursor: default; }

/* המדף: כל התיקים של החודש כקלסרים, צבע לפי סטטוס */
.shelf-card { padding-bottom: 14px; }
.shelf {
  display: flex; flex-wrap: wrap; gap: 14px 3px; padding: 4px 2px 0;
  background-image: linear-gradient(to bottom, transparent 66px, #b9c4bf 66px, #b9c4bf 69px, transparent 69px);
  background-size: 100% 80px;
}
.binder {
  --c: var(--s-closed-bar);
  width: 22px; height: 66px; border-radius: 3px 3px 1px 1px; background: var(--c); position: relative;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px;
  box-shadow: inset -3px 0 0 rgba(0,0,0,.1), inset 0 2px 0 rgba(255,255,255,.25);
  transition: transform .12s;
}
.binder::before { content: ""; position: absolute; top: 9px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: rgba(255,255,255,.7); box-shadow: inset 0 1px 1px rgba(0,0,0,.25); }
.binder span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 10px; font-weight: 700; color: rgba(0,0,0,.62); letter-spacing: .04em; }
.binder:hover, .binder:focus-visible { transform: translateY(-5px); text-decoration: none; }
.binder.dim { opacity: .25; }
.binder.s-waiting { --c: var(--s-waiting-bar); } .binder.s-partial { --c: var(--s-partial-bar); }
.binder.s-client_done { --c: var(--s-client_done-bar); } .binder.s-in_progress { --c: var(--s-in_progress-bar); }
.binder.s-ready_review { --c: var(--s-ready_review-bar); } .binder.s-closed { --c: var(--s-closed-bar); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }

@media (max-width: 1100px) { .lanes { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .hello h1 { font-size: 24px; } }

/* רצועת המסמכים של התיק במסך האישור */
.filmstrip { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 4px; }
.filmstrip .frame { position: relative; flex: none; width: 46px; height: 56px; border-radius: 7px; border: 2px solid transparent; background: var(--card); box-shadow: var(--shadow); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--muted); }
.filmstrip .frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.filmstrip .frame:hover { text-decoration: none; transform: translateY(-2px); }
.filmstrip .frame.on { border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft); }
.filmstrip .frame i { position: absolute; bottom: 3px; inset-inline-end: 3px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: #c9d2ce; }
.filmstrip .st-approved i { background: var(--ok); }
.filmstrip .st-needs_review i { background: #e2b13c; }
.filmstrip .st-other i { background: var(--s-client_done-bar); }
.filmstrip > span { margin-inline-start: 6px; white-space: nowrap; }

/* טיוטת תשובה של הבוט בתיבת ההודעות */
.bot-draft { border: 1px solid #cfe3da; background: #f3f9f6; border-radius: 10px; padding: 12px 14px; margin-top: 12px; }
.bot-draft.is-escalated { border-color: var(--mustard-line); background: #fffaf0; }
.bot-draft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.bot-badge { background: var(--pine); color: #fff; font-size: 12px; font-weight: 600; border-radius: 6px; padding: 0 8px; line-height: 22px; }
.bot-draft textarea { width: 100%; background: #fff; }

/* ================= סבב 3: הייטקי, צבעוני וכיפי ================= */
body { background:
  radial-gradient(900px 500px at 100% -10%, rgba(140, 107, 255, .10), transparent 60%),
  radial-gradient(700px 400px at 0% 0%, rgba(255, 95, 162, .07), transparent 60%), var(--bg); background-attachment: fixed; }

/* תפריט צד */
.side { background: linear-gradient(180deg, #1b1747 0%, #120f33 100%); color: #c9c6ef; box-shadow: inset 1px 0 0 rgba(255,255,255,.05); }
.side .brand .mark { background: var(--grad); box-shadow: 0 4px 14px rgba(176, 75, 255, .45); }
.side .brand .mark::after { background: #fff; opacity: .9; }
.side .brand small { color: #9d98d6; }
.side nav a { color: #cfcbf5; }
.side nav a:hover { background: rgba(255,255,255,.07); }
.side nav a.on { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset -3px 0 0 #b98cff; }
.side nav .count { background: #ff5d73; color: #fff; box-shadow: 0 2px 8px rgba(255, 93, 115, .45); }
.side .me { border-top-color: rgba(255,255,255,.08); }
.side .me a { color: #9d98d6; }
.side .find {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); color: #b9b5ea; font-weight: 400; font-size: 14px;
}
.side .find:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.side .find span:first-of-type { flex: 1; text-align: start; }
.side .find .kbd { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #d9d6ff; }
.avatar { background: linear-gradient(135deg, #efe9ff, #ffe3f0); color: var(--pine); }
.side .avatar { background: var(--grad); color: #fff; }

/* כפתורים וכרטיסים */
button.primary, .btn.primary { background: var(--grad); border-color: transparent; box-shadow: 0 4px 14px -4px rgba(106, 75, 255, .6); }
button.primary:hover, .btn.primary:hover { background: var(--grad); filter: brightness(1.08); box-shadow: 0 6px 18px -4px rgba(106, 75, 255, .7); }
button.ok, .btn.ok { background: linear-gradient(135deg, #12b886, #0f9d74); border-color: transparent; box-shadow: 0 6px 18px -6px rgba(15, 157, 116, .7); }
button.ok:hover { background: linear-gradient(135deg, #12b886, #0f9d74); filter: brightness(1.06); }
button, .btn { transition: transform .08s, background-color .12s, border-color .12s, box-shadow .12s, filter .12s; }
button:active, .btn:active { transform: translateY(1px); }
.card, .lane { border-color: rgba(22, 20, 51, .06); }
th { background: #fafaff; }
.tabs a.on { border-bottom-color: var(--pine); }
.tabs a.on .n { background: var(--grad); border-color: transparent; }
.chip-toggle:has(input:checked) { background: var(--pine-soft); border-color: var(--pine); color: var(--pine); }
.chat { background: linear-gradient(180deg, #f3f1ff, #fbf3fb); }
.bubble.out { background: #e5ddff; }
.meter .bar i { background: linear-gradient(90deg, #16c995, #0f9d74); }
.meter .bar i.rev { background: linear-gradient(90deg, #ffc35c, #ffad33); }
.stepper li.done::before, .stepper li.now::before { background: var(--grad); border-color: transparent; }
.stepper li.done::after { background: #b98cff; }
.dropzone:hover, .dropzone.over { background: var(--pine-soft); }
.flash { background: #1b1747; box-shadow: var(--shadow-lg); }

/* פס הפתיחה */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px 22px; margin-bottom: 18px; color: #fff;
  background:
    radial-gradient(600px 300px at 85% -20%, rgba(150, 130, 255, .30), transparent 60%),
    radial-gradient(500px 300px at 5% 120%, rgba(120, 100, 255, .18), transparent 60%),
    linear-gradient(135deg, #1a1748 0%, #221c5e 100%);
  box-shadow: var(--shadow-lg);
}
.hero::after { /* רשת עדינה */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.hero > * { position: relative; z-index: 1; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.hero h1 { font-size: 34px; font-weight: 800; letter-spacing: -.015em; color: #fff; }
.hero .today { color: #c9c3ff; font-size: 14px; min-height: 22px; }
.hero .month-nav { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); backdrop-filter: blur(6px); }
.hero .month-nav a { color: #e6e2ff; }
.hero .month-nav a:hover { background: rgba(255,255,255,.12); }
.hero .month-nav b { color: #fff; }
.hero-body { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 28px; align-items: center; margin-top: 22px; }
.ring {
  --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 0deg, #9d8cff 0%, #b9adff calc(var(--p) * 1%), rgba(255,255,255,.12) 0);
  box-shadow: 0 0 40px rgba(140, 107, 255, .45);
  animation: ring-in 1s cubic-bezier(.2,.8,.2,1);
}
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
@keyframes ring-in { from { --p: 0; } }
.ring > div { width: 104px; height: 104px; border-radius: 50%; background: #221b63; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring b { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; }
.ring span { font-size: 12px; color: #c9c3ff; margin-top: 4px; }
.hero-stats { display: grid; gap: 8px; }
.hero-stats a { display: flex; align-items: baseline; gap: 10px; color: #fff; padding: 6px 12px; border-radius: 10px; }
.hero-stats a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.hero-stats b { font-family: var(--display); font-size: 24px; font-weight: 700; min-width: 64px; }
.hero-stats b small { font-size: 14px; color: #b7b0f0; font-weight: 500; }
.hero-stats span { color: #d6d1ff; font-size: 14px; }

.shelf-wrap { min-width: 0; background: rgba(10, 8, 40, .35); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px 14px 10px; }
.hero .shelf { display: flex; flex-wrap: wrap; gap: 6px 3px; background: none; padding: 0; }
.hero .binder {
  width: 11px; height: 34px; padding: 0; border-radius: 3px 3px 2px 2px;
  box-shadow: inset -2px 0 0 rgba(0,0,0,.18), 0 0 10px -2px var(--c);
}
.hero .binder::before { top: 5px; width: 5px; height: 5px; margin-left: -2.5px; background: rgba(255,255,255,.75); }
.hero .binder.s-closed { --c: #6f76a6; }
.hero .binder:hover, .hero .binder:focus-visible { transform: translateY(-4px) scale(1.15); z-index: 2; }
.hero .binder.dim { opacity: .18; }
.hero .legend { margin-top: 12px; gap: 4px 16px; }
.hero .legend a { color: #cfcaff; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 6px; border-radius: 6px; }
.hero .legend a:hover, .hero .legend a.on { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.hero .legend b { color: #fff; }
.tip { position: fixed; z-index: 80; pointer-events: none; background: #fff; color: var(--ink); font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(50%, -130%); }

/* עמודות "מה מחכה לי" */
.lane { border-top: 0 !important; position: relative; }
.lane::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; }
.lane:nth-child(1)::before { background: linear-gradient(90deg, #ffad33, #3f2bb8); }
.lane:nth-child(2)::before { background: linear-gradient(90deg, #ff5d73, #ff8a5c); }
.lane:nth-child(3)::before { background: linear-gradient(90deg, #16c995, #3b9bff); }
.lane-head { gap: 10px; padding: 16px 18px 8px; }
.lane-head h2 { flex: 1; }
.lane-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; flex: none; }
.lane:nth-child(1) .lane-ico { background: linear-gradient(135deg, #ffad33, #3f2bb8); }
.lane:nth-child(2) .lane-ico { background: linear-gradient(135deg, #ff5d73, #ff8a5c); }
.lane:nth-child(3) .lane-ico { background: linear-gradient(135deg, #16c995, #3b9bff); }
.lane-n { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--muted); }
.lane ul { max-height: 292px; overflow-y: auto; scrollbar-width: thin; }
.lane li .cnt { min-width: 26px; text-align: center; font-weight: 700; font-size: 13px; color: #9a5b00; background: var(--mustard-soft); border-radius: 999px; padding: 1px 8px; }

/* טבלה: כותרת דביקה, מיון וניווט במקלדת */
.board thead th { position: sticky; top: 0; z-index: 3; }
.table-wrap:has(#board-table) { overflow: visible; }
th[data-sort] { cursor: pointer; user-select: none; }
th[data-sort]:hover { color: var(--ink); }
th[data-sort]::after { content: "↕"; opacity: .3; margin-inline-start: 4px; font-size: 11px; }
th[data-sort].asc::after { content: "↑"; opacity: .9; color: var(--pine); }
th[data-sort].desc::after { content: "↓"; opacity: .9; color: var(--pine); }
.board tr.kb td { background: var(--pine-soft) !important; }
.board tr.kb td:first-child { box-shadow: inset -3px 0 0 var(--pine); }

/* חלון קפיצה ללקוח */
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(18, 15, 51, .45); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: 100%; max-width: 560px; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(18, 15, 51, .6); overflow: hidden; animation: pal-in .16s ease-out; }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.palette-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.palette-in svg { width: 20px; height: 20px; color: var(--pine); flex: none; }
.palette-in input { flex: 1; border: 0; font-size: 18px; padding: 4px 0; box-shadow: none !important; }
#palette-list { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
#palette-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
#palette-list li.on { background: var(--pine-soft); }
#palette-list li .go { margin-inline-start: auto; font-size: 12px; color: var(--muted); }
#palette-list li.empty { color: var(--muted); justify-content: center; cursor: default; }
.palette-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--sunk); flex-wrap: wrap; }

/* חגיגה */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 120; }

@media (max-width: 1100px) {
  .hero-body { grid-template-columns: auto 1fr; }
  .shelf-wrap { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .hero { padding: 20px 16px; border-radius: 18px; }
  .hero h1 { font-size: 26px; }
  .ring { width: 104px; height: 104px; } .ring > div { width: 80px; height: 80px; } .ring b { font-size: 22px; }
  .side .find span:first-of-type, .side .find .kbd { display: none; }
  .side .find { width: auto; margin: 0; }
  .board thead th { position: static; }
}
.card.flush:has(#board-table) { overflow: visible; }

/* ראש התיק החודשי */
.file-hero { padding: 22px 24px 18px; }
.file-hero .page-head { margin-bottom: 18px; }
.file-hero h1 { font-size: 30px; }
.file-hero .page-head .sub { color: #cfcaff; }
.file-hero .page-head .sub b { color: #fff; }
.file-hero .spine.lg { box-shadow: 0 0 24px rgba(255,255,255,.18); }
.file-hero .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.file-hero .btn:hover { background: rgba(255,255,255,.18); }
.kpis { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.kpis > div { flex: 1 1 160px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 10px 14px; backdrop-filter: blur(4px); }
.kpis span { display: block; font-size: 13px; color: #c9c3ff; }
.kpis b { font-family: var(--display); font-size: 24px; font-weight: 700; color: #fff; display: inline-block; }
.kpis b small { font-size: 14px; color: #b7b0f0; font-weight: 500; }
.kpis .hot { background: rgba(255,255,255,.12); border-color: rgba(255,200,120,.5); }
.hero-panel { background: #fff; color: var(--ink); border-radius: 16px; padding: 16px 18px; box-shadow: 0 10px 30px -12px rgba(0,0,0,.4); }
.crumbs a:hover { color: var(--pine); }

/* לוח צפוף יותר: 200 שורות בלי גלילה אינסופית */
@media (min-width: 861px) {
  .board td { padding-block: 7px; }
  .board .who > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .board .who .meta { margin-top: 0; }
  .board .meter { display: flex; align-items: center; gap: 10px; }
  .board .meter .bar { margin-top: 0; flex: 1; min-width: 60px; }
}
.meter .nums { white-space: nowrap; }
@media (max-width: 860px) {
  .hero .binder { width: 7px; height: 22px; } .hero .binder::before { display: none; }
  .hero .shelf { gap: 4px 2px; }
  .hero-stats b { font-size: 20px; min-width: 52px; }
}

/* ===================== סבב 4: צוות, ציר תזכורות, "לבדיקה", הגדרות וכניסה ===================== */

/* ---------- הגדרות: ניווט, פס מצב, כותרות חלקים ---------- */
.jump { display: flex; gap: 4px; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.jump a { font-size: 13px; padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.jump a:hover { background: var(--grad); color: #fff; text-decoration: none; }
.page-head:has(.jump) { position: sticky; top: 0; z-index: 20; padding-block: 12px; margin-inline: -8px; padding-inline: 8px;
  background: color-mix(in srgb, var(--bg, #f4f4fb) 82%, transparent); backdrop-filter: blur(12px) saturate(1.4); }
:target { scroll-margin-top: 90px; }

.sys-strip { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.sys { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 16px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sys i { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent), 0 0 14px var(--ok); flex: none; }
.sys.warn i { background: #ffad33; box-shadow: 0 0 0 4px rgba(255,173,51,.2), 0 0 14px #ffad33; }
.sys small { color: var(--muted); font-size: 12px; }
.sys b { font-size: 13px; }

.settings-form { counter-reset: sec; }
.settings-form > h2 { counter-increment: sec; display: flex; align-items: center; gap: 10px; font-size: 18px; }
.settings-form > h2::before { content: counter(sec); width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none;
  font: 800 14px/1 var(--display); color: #fff; background: var(--grad); box-shadow: 0 6px 14px -6px rgba(91,61,245,.8); }
.settings-form > hr.sep { margin-block: 26px 22px; }

.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 720px) { .grid3 { grid-template-columns: 1fr; } }
.day-input { display: flex; align-items: center; gap: 8px; }
.day-input input { width: 76px; text-align: center; font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--pine);
  border-radius: 12px; background: linear-gradient(#fff, #fff) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.day-input input:focus { box-shadow: 0 0 0 4px rgba(91,61,245,.18); }
.day-input span { color: var(--muted); font-size: 14px; }

/* ---------- ציר החודש: רצועת 28 ימים עם נקודות זוהרות ---------- */
.tl { --a: 1; --b: 10; position: relative; margin: 18px 0 22px; padding: 50px 44px 56px; border-radius: var(--radius);
  background: radial-gradient(120% 140% at 100% 0%, rgba(91,61,245,.10), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(91,61,245,.10), transparent 60%), var(--sunk);
  border: 1px solid var(--line); overflow: hidden; }
.tl-track { position: relative; height: 14px; border-radius: 999px; background:
  repeating-linear-gradient(to left, transparent 0 calc(100% / 27 - 2px), rgba(91,61,245,.18) calc(100% / 27 - 2px) calc(100% / 27)), #fff;
  border: 1px solid var(--line); box-shadow: inset 0 1px 3px rgba(21,18,58,.08); }
.tl-span { position: absolute; top: -1px; bottom: -1px; border-radius: 999px; background: linear-gradient(90deg, #5b3df5, #6c50f7, #3f2bb8, #6c50f7, #5b3df5); background-size: 200% 100%;
  inset-inline-start: calc((var(--a) - 1) / 27 * 100%); width: calc((var(--b) - var(--a)) / 27 * 100%);
  box-shadow: 0 0 18px rgba(91,61,245,.55); animation: tlflow 6s linear infinite;
  transition: inset-inline-start .35s cubic-bezier(.2,.8,.2,1.2), width .35s cubic-bezier(.2,.8,.2,1.2); }
@keyframes tlflow { to { background-position: -200% 0; } }
.tl-tick { position: absolute; top: 22px; transform: translateX(50%); font: 600 11px/1 var(--display); color: var(--muted);
  inset-inline-start: calc((var(--d) - 1) / 27 * 100%); }
.tl-dot { position: absolute; top: 50%; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%; display: grid; place-items: center; z-index: 1;
  inset-inline-start: calc((var(--d) - 1) / 27 * 100% - 15px); background: #fff; border: 3px solid var(--pine);
  box-shadow: 0 0 0 5px rgba(91,61,245,.14), 0 8px 18px -6px rgba(91,61,245,.7);
  transition: inset-inline-start .35s cubic-bezier(.2,.8,.2,1.2); }
.tl-dot span { font: 800 12px/1 var(--display); color: var(--pine); }
.tl-dot em { position: absolute; bottom: 36px; font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; color: #fff;
  background: var(--pine); padding: 3px 10px; border-radius: 8px; box-shadow: 0 6px 14px -6px rgba(21,18,58,.5); }
.tl-dot em::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border: 5px solid transparent; border-top-color: inherit; border-top-color: var(--pine); }
.tl-dot.second { border-color: #6c50f7; box-shadow: 0 0 0 5px rgba(91,61,245,.14), 0 8px 18px -6px rgba(91,61,245,.7); }
.tl-dot.second span { color: #6c50f7; }
.tl-dot.second em { bottom: auto; top: 36px; background: #6c50f7; z-index: 2; }
.tl-dot.second em::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: #6c50f7; }
.tl-dot.deadline { border: 0; background: linear-gradient(135deg, #3f2bb8, #4a32c9); box-shadow: 0 0 0 5px rgba(91,61,245,.2), 0 0 22px rgba(91,61,245,.7); }
.tl-dot.deadline::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #3f2bb8; animation: tlping 2.2s ease-out infinite; }
.tl-dot.deadline span { color: #fff; }
.tl-dot.deadline em { background: linear-gradient(135deg, #3f2bb8, #4a32c9); }
.tl-dot.deadline em::after { border-top-color: #ff6f8f; }
@keyframes tlping { 0% { transform: scale(.9); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.tl-dot[hidden] { display: none; }
.tl-dot.pop { animation: tlpop .4s ease; }
@keyframes tlpop { 40% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .tl-span, .tl-dot { transition: none; animation: none; } .tl-dot.pop, .tl-dot.deadline::before { animation: none; } }
.custom-list { margin: 14px 0 4px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--card); }
.custom-list summary { cursor: pointer; color: var(--ink-2); }
.custom-list summary b { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--grad); color: #fff; font-family: var(--display); margin-inline-end: 4px; }
.custom-list table { margin-top: 10px; }
.schedule .chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 14px; }

/* ---------- צוות ---------- */
.team { position: relative; overflow: hidden; }
.team::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.team-head { align-items: center; gap: 18px; }
.team-title { flex: 1; min-width: 0; }
.team-stack { display: flex; flex: none; padding-inline-start: 10px; }
.team-stack .avatar { width: 46px; height: 46px; font-size: 19px; margin-inline-start: -12px; border: 3px solid var(--card); box-shadow: 0 6px 16px -6px rgba(21,18,58,.45); transition: transform .2s; }
.team-stack .avatar:hover { transform: translateY(-4px) scale(1.06); z-index: 1; }
.team-nums { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.team-nums span { font-size: 12px; color: var(--ink-2); background: var(--pine-soft); padding: 3px 10px; border-radius: 999px; }
.team-nums b { font-family: var(--display); color: var(--pine); font-size: 14px; }
.login-health { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 6px 14px; border-radius: 999px; white-space: nowrap; align-self: flex-start; }
.login-health i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 20%, transparent), 0 0 12px currentColor; animation: hpulse 2s ease-in-out infinite; }
@keyframes hpulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 6%, transparent), 0 0 4px currentColor; } }
.login-health.ok { background: var(--ok-soft); color: var(--ok); }
.login-health.bad { background: var(--red-soft); color: var(--red); }
.avatar { --h: 262; width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font-weight: 700; font-family: var(--display);
  background: linear-gradient(135deg, hsl(var(--h) 85% 62%), hsl(calc(var(--h) + 50) 90% 64%)); }
.avatar.lg { width: 48px; height: 48px; font-size: 21px; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.who-cell input.bare { font-weight: 600; min-width: 110px; }
input.bare { border-color: transparent; background: transparent; padding-inline: 6px; min-width: 0; width: 100%; box-shadow: none; }
input.bare:hover, input.bare:focus { border-color: var(--line-2); background: #fff; }
.team-table input.ltr.bare { min-width: 170px; color: var(--ink-2); }
.team-table tbody tr { transition: background .15s; }
.team-table tbody tr:hover { background: linear-gradient(to left, rgba(91,61,245,.06), transparent 70%); }
.team-table tr.off { opacity: .45; filter: grayscale(.6); }
.team-table button.save { opacity: 0; transition: opacity .15s; }
.team-table tr:hover button.save, .team-table tr:focus-within button.save { opacity: 1; }
@media (hover: none) { .team-table button.save { opacity: 1; } }
select.role-chip { border-radius: 999px; padding-block: 5px; font-weight: 600; font-size: 13px; border-color: transparent; background-color: var(--pine-soft); color: var(--pine); min-width: 128px; }
select.role-chip.r-admin, select.role-chip.r-manager { background-color: #15123a; color: #fff; }
select.role-chip.r-payroll { background-color: #e5f2ff; color: #1b6fd1; }
select.role-chip.r-reviewer { background-color: #e3f8f0; color: #0b8a63; }
select.role-chip:disabled { opacity: 1; }
.add-user { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); border: 1.5px dashed rgba(91,61,245,.45);
  background: linear-gradient(135deg, rgba(106,75,255,.07), rgba(91,61,245,.07)); }
.add-user .add-ico { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; font: 800 20px/1 var(--display); }
.add-user input[name=name] { flex: 1 1 140px; } .add-user input[name=email] { flex: 2 1 200px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .2s, box-shadow .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.2); transition: inset-inline-start .2s cubic-bezier(.2,.8,.2,1.3); }
.switch input:checked + i { background: linear-gradient(135deg, #16c995, #0fb5a0); box-shadow: 0 0 12px rgba(22,201,149,.45); }
.switch input:checked + i::after { inset-inline-start: 21px; }
.switch input:focus-visible + i { outline: 2px solid var(--pine); outline-offset: 2px; }
.invite { position: relative; overflow: hidden; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; color: #fff;
  background: radial-gradient(60% 120% at 0% 0%, rgba(91,61,245,.45), transparent 60%), linear-gradient(135deg, #1d1660, #5b3df5 60%, #6c50f7); box-shadow: var(--shadow-lg); }
.invite-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.invite-head .avatar { background: #fff; color: var(--pine); }
.invite .steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 12px; }
.invite .steps .small { color: #dcd6ff; margin: 2px 0 8px; }
.invite .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.invite .btn.primary { background: #25d366; border-color: #25d366; }
.copy { cursor: pointer; padding: 1px 8px; border-radius: 6px; background: rgba(127,127,127,.15); border: 1px dashed currentColor; }
.copy.copied::after, button.copied::after { content: " ✓ הועתק"; font-weight: 700; }
.login-help { margin-top: 12px; } .login-help summary { cursor: pointer; }
.login-help li { margin-bottom: 6px; }

/* ---------- "לבדיקה": מתג מקטעים, דגלים צבעוניים, מצב ריק ---------- */
.tabs.seg { display: inline-flex; gap: 4px; padding: 5px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.tabs.seg a { padding: 8px 16px; border: 0; margin: 0; border-radius: 10px; font-weight: 600; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; transition: background .15s, color .15s; }
.tabs.seg a:hover { background: var(--sunk); }
.tabs.seg a.on { background: var(--pine-deep); color: #fff; box-shadow: 0 8px 18px -8px rgba(21,18,58,.7); }
.tabs.seg .count { font: 700 12px/20px var(--display); min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); text-align: center; }
.tabs.seg a.on .count { background: rgba(255,255,255,.18); color: #fff; }
.tabs.seg .count.hot { background: var(--grad); color: #fff; box-shadow: 0 0 12px rgba(91,61,245,.5); }
.flag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px 3px 9px; margin: 2px 0 2px 4px; border-radius: 999px; font-weight: 600;
  background: #fff4e0; color: #8a5600; border: 1px solid #ffd99a; }
.flag::before { font-size: 12px; }
.flag.f-not_document::before { content: "🖼️"; }
.flag.f-not_expense::before { content: "📄"; }
.flag.f-other_party::before { content: "👤"; }
.flag.f-old::before { content: "⏳"; }
.flag.f-future::before { content: "📅"; }
.flag.f-not_document, .flag.f-other_party { background: #ffe8ee; color: #c2264b; border-color: #ffc2d0; }
.flag.f-not_expense { background: #e9f1ff; color: #1b5fc2; border-color: #c4d8ff; }
table.flagged tbody tr { transition: background .15s; }
table.flagged tbody tr:hover { background: linear-gradient(to left, rgba(91,61,245,.06), transparent 70%); }
table.flagged .thumb { width: 48px; height: 60px; border-radius: 8px; object-fit: cover; box-shadow: 0 6px 14px -8px rgba(21,18,58,.6); transition: transform .2s; }
table.flagged tr:hover .thumb { transform: rotate(-3deg) scale(1.08); }
.actions.nowrap { flex-wrap: nowrap; }
.empty.big { padding: 56px 16px; }
.empty .empty-ico { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font: 800 30px/1 var(--display); color: #fff;
  background: linear-gradient(135deg, #16c995, #3b9bff); box-shadow: 0 14px 30px -12px rgba(22,201,149,.8); transform: rotate(-6deg); }
.empty.big b { font-size: 18px; }

/* במסך המסמך */
.flag-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #fff1f5, #fff6ea); border: 1px solid #ffc9d6; box-shadow: 0 8px 20px -14px rgba(91,61,245,.8); }
.flag-bar > .small { flex: 1 1 calc(100% - 50px); }
.flag-bar .flag-ico { width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center; font: 800 18px/1 var(--display); color: #fff;
  background: linear-gradient(135deg, #3f2bb8, #4a32c9); box-shadow: 0 0 16px rgba(91,61,245,.5); }
.flag-bar .flag-list { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.flag-bar form { margin-inline-start: 42px; }
.flag-bar form + form { margin-inline-start: 0; }

/* ---------- כניסה: מסך מפוצל עם מדף זוהר ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); padding: 0; place-items: stretch; }
.login-side { display: grid; place-items: center; padding: 32px 24px; }
.login .card.login-card { width: 100%; max-width: 400px; padding: 36px 34px; border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(21,18,58,.35), 0 0 0 1px var(--line); }
.login .brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login .brand h1 { font-size: 26px; }
.login .brand .mark { width: 38px; height: 48px; border-radius: 5px 11px 11px 5px; background: var(--grad); box-shadow: inset -7px 0 0 rgba(0,0,0,.16), 0 10px 24px -8px rgba(91,61,245,.8); }
.login select { width: 100%; margin-bottom: 12px; }
.login .warnings { margin-bottom: 16px; }
.login-art { position: relative; overflow: hidden; color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 56px 64px;
  background: #110d33; isolation: isolate; }
.login-art .orb { position: absolute; border-radius: 50%; filter: blur(70px); z-index: -1; animation: orb 14s ease-in-out infinite alternate; }
.login-art .o1 { width: 460px; height: 460px; background: #5b3df5; top: -140px; left: -120px; opacity: .75; }
.login-art .o2 { width: 400px; height: 400px; background: #3f2bb8; bottom: -160px; right: -80px; opacity: .55; animation-delay: -7s; }
@keyframes orb { to { transform: translate(60px, 40px) scale(1.12); } }
.login-art .grid-bg { position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
.login-copy .eyebrow { display: inline-block; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #d9d2ff; }
.login-copy h2 { font: 800 clamp(30px, 3.4vw, 46px)/1.15 var(--display); margin: 18px 0 24px; letter-spacing: -.01em; }
.grad-text { background: linear-gradient(90deg, #cfc4ff, #cfc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #e6e2ff; }
.perks i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-style: normal; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.login-shelf { display: flex; align-items: flex-end; gap: 4px; height: 86px; padding: 0 14px 10px; border-bottom: 6px solid rgba(255,255,255,.14); border-radius: 0 0 6px 6px;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.4)); }
.login-shelf .b { flex: 1; max-width: 16px; height: var(--h); border-radius: 3px 3px 2px 2px; background: var(--c); box-shadow: inset -3px 0 0 rgba(0,0,0,.18), 0 0 14px color-mix(in srgb, var(--c) 45%, transparent);
  transform-origin: bottom; animation: rise .7s cubic-bezier(.2,.8,.2,1.2) both; animation-delay: calc(var(--i) * 35ms); }
.login-shelf .s-closed { --c: #a3a9c4; } .login-shelf .s-ready_review { --c: #16c995; } .login-shelf .s-in_progress { --c: #8c6bff; }
.login-shelf .s-client_done { --c: #3b9bff; } .login-shelf .s-partial { --c: #ffad33; } .login-shelf .s-waiting { --c: #ff5d73; }
@keyframes rise { from { transform: scaleY(0); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .login-art .orb, .login-shelf .b, .login-health i { animation: none; } }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { order: -1; padding: 32px 22px 26px; gap: 24px; }
  .login-copy h2 { font-size: 28px; margin-top: 14px; }
  .login-side { place-items: start center; padding: 22px 16px 32px; }
  .login-art .perks, .login-shelf { display: none; }
  .login-copy h2 { margin-bottom: 0; }
}
body:has(.login) main { padding: 0; max-width: none; margin: 0; }
.login-shelf { justify-content: center; }
.login-shelf .b { flex: 0 0 13px; }

/* ===================== מרגיעים את הצבעים: צבע ראשי אחד, צבעים רק לסטטוס ===================== */
.lane::before, .lane:nth-child(n)::before { background: var(--line-2); height: 3px; }
.lane:nth-child(1)::before { background: var(--s-partial-bar); }
.lane:nth-child(2)::before { background: var(--s-waiting-bar); }
.lane:nth-child(3)::before { background: var(--s-ready_review-bar); }
.lane .lane-ico, .lane:nth-child(n) .lane-ico { background: var(--sunk); border: 1px solid var(--line); }
.lane:nth-child(1) .lane-ico { color: var(--s-partial-ink); }
.lane:nth-child(2) .lane-ico { color: var(--s-waiting-ink); }
.lane:nth-child(3) .lane-ico { color: var(--s-ready_review-ink); }
.hero .binder { box-shadow: inset -2px 0 0 rgba(0,0,0,.18); }
.avatar, .team-stack .avatar { background: var(--pine-soft); color: var(--pine); }
.side .avatar, .me .avatar { background: rgba(255,255,255,.12); color: #fff; }
select.role-chip, select.role-chip.r-payroll, select.role-chip.r-reviewer { background-color: var(--sunk); color: var(--ink-2); }
select.role-chip.r-admin, select.role-chip.r-manager { background-color: var(--pine-soft); color: var(--pine); }
.switch input:checked + i { background: var(--pine); box-shadow: none; }
.login-health i { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.sys i { box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 16%, transparent); }
.sys.warn i { background: var(--mustard); box-shadow: 0 0 0 4px var(--mustard-soft); }
.flag { background: var(--sunk); color: var(--ink-2); border-color: var(--line); }
.flag::before { content: none !important; }
.flag.f-not_document, .flag.f-other_party { background: var(--red-soft); color: var(--red); border-color: #f5c9d1; }
.flag.f-not_expense { background: var(--sunk); color: var(--ink-2); border-color: var(--line); }
.flag-bar { background: var(--red-soft); border-color: #f5c9d1; box-shadow: none; }
.flag-bar .flag-ico { background: var(--red); box-shadow: none; }
.empty .empty-ico { background: var(--ok-soft); color: var(--ok); box-shadow: none; transform: none; }
.tabs.seg .count.hot { background: var(--pine); box-shadow: none; }
.tl { background: var(--sunk); }
.tl-span { background: var(--pine); animation: none; box-shadow: none; opacity: .85; }
.tl-dot { box-shadow: 0 0 0 4px rgba(91,61,245,.10); }
.tl-dot.second { border-color: #8f7cf0; box-shadow: 0 0 0 4px rgba(91,61,245,.08); } .tl-dot.second span { color: #6c50f7; }
.tl-dot.second em { background: #8f7cf0; } .tl-dot.second em::after { border-bottom-color: #8f7cf0; }
.tl-dot.deadline { background: var(--pine-deep); box-shadow: 0 0 0 4px rgba(21,18,58,.12); }
.tl-dot.deadline::before { content: none; }
.tl-dot.deadline em { background: var(--pine-deep); } .tl-dot.deadline em::after { border-top-color: var(--pine-deep); }
.day-input input { background: #fff; border: 1.5px solid var(--line-2); color: var(--ink); }
.day-input input:focus { border-color: var(--pine); }
.add-user { background: var(--sunk); border-color: var(--line-2); }
.add-user .add-ico { background: var(--pine-soft); color: var(--pine); }
.team::before { background: var(--pine); height: 3px; }
.team-table tbody tr:hover, table.flagged tbody tr:hover { background: var(--sunk); }
.invite { background: linear-gradient(135deg, #1a1748, #2d2380); }
.login-art { background: #14113a; }
.login-art .o1 { opacity: .45; }
.login-art .o2 { background: #3b2fa8; opacity: .35; }
.login-shelf .b { box-shadow: inset -3px 0 0 rgba(0,0,0,.18); opacity: .9; }
.grad-text { background: none; color: #c9bfff; -webkit-background-clip: border-box; background-clip: border-box; }
.login-shelf .b { --c: #4b3ab8; } .login-shelf .s-closed { --c: #3a3480; } .login-shelf .s-ready_review { --c: #6c50f7; }
.login-shelf .s-in_progress { --c: #5640d6; } .login-shelf .s-client_done { --c: #8f7cf0; } .login-shelf .s-partial { --c: #b3a6f7; } .login-shelf .s-waiting { --c: #d4ccff; }

/* ===================== זכוכית מגדלת ומסך מלא באישור קבלה ===================== */
.viewer { position: relative; }
.viewer img { cursor: zoom-in; }
.loupe { position: absolute; z-index: 3; width: 240px; height: 240px; border-radius: 50%; pointer-events: none; background-repeat: no-repeat; background-color: #fff;
  border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(21,18,58,.25), 0 18px 40px -12px rgba(0,0,0,.6); }
.viewer-tools button.on { background: rgba(255,255,255,.2); }
.viewer-hint { margin-top: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.touch-only { display: none; }
@media (hover: none), (pointer: coarse) { .fine-only { display: none; } .touch-only { display: inline; } .viewer img { cursor: pointer; } }

body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: #0c0a20; display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
.lb-stage.grabbing { cursor: grabbing; }
.lb-stage img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; transform-origin: center center; will-change: transform; box-shadow: 0 20px 60px rgba(0,0,0,.5); -webkit-user-drag: none; }
.lb-stage iframe { display: block; margin: 0 auto; width: min(1000px, 100%); height: 100%; border: 0; background: #fff; }
.lb-bar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 14px;
  background: rgba(21,18,58,.92); border: 1px solid rgba(255,255,255,.14); box-shadow: 0 10px 30px rgba(0,0,0,.4); z-index: 2; }
.lb-bar button { background: transparent; border: 0; color: #fff; min-width: 40px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 18px; font-weight: 600; }
.lb-bar button:hover { background: rgba(255,255,255,.14); }
.lb-bar .lb-close { font-size: 14px; display: inline-flex; gap: 8px; align-items: center; background: rgba(255,255,255,.16); }
.lb-bar .kbd { background: rgba(255,255,255,.15); color: #fff; border-color: transparent; }
.lb-pct { color: #d9d4ff; font: 600 13px/1 var(--display); min-width: 48px; text-align: center; }
.lb-tip { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); background: rgba(21,18,58,.85); padding: 6px 12px; border-radius: 999px; font-size: 13px; white-space: nowrap; pointer-events: none; }
@media (max-width: 600px) {
  .lb-bar { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); }
  .lb-bar [data-lb=fit] { display: none; }
  .lb-bar .lb-close .kbd { display: none; }
  .lb-tip { bottom: auto; top: 14px; }
}
.viewer-tools [hidden] { display: none; }
.lightbox:focus { outline: none; }
.not-due { margin: -4px 4px 14px; font-size: 13.5px; }
.nowrap { white-space: nowrap; }
.doclist .sup { display: inline-block; min-width: 9em; }
.doclist .tag { margin-top: 4px; display: inline-block; }
.demo-card .demo-bar { height: 8px; border-radius: 99px; background: var(--line, #eee); overflow: hidden; margin: 10px 0 4px; }
.demo-card .demo-bar i { display: block; height: 100%; background: var(--pine, #5b3df5); transition: width .6s; }

/* תמונת מצב למשרד */
.ov-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.ov-k { display: flex; align-items: center; gap: 12px; background: rgba(10, 8, 40, .35); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px 16px; min-width: 0; }
.ov-k > b { font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1; }
.ov-k span { color: #e6e2ff; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.ov-k small { color: #b7b0f0; font-size: 12px; }
.ov-k.hl { background: linear-gradient(135deg, rgba(157,140,255,.35), rgba(91,61,245,.25)); border-color: rgba(185,173,255,.35); }
.ring.sm { width: 64px; height: 64px; flex: none; box-shadow: 0 0 22px rgba(140,107,255,.4); }
.ring.sm > div { width: 50px; height: 50px; }
.ring.sm b { font-size: 16px; }
.ov-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ov-grid .card { margin: 0; }
.ov-grid .ov-wide { grid-column: 1 / -1; }
.ov-grid h2 { margin-bottom: 14px; }
.ov-h3 { font-size: 15px; margin: 18px 0 10px; }
.ov-stack { display: flex; height: 46px; border-radius: 12px; overflow: hidden; gap: 2px; }
.ov-stack a { display: grid; place-items: center; min-width: 26px; background: var(--s-waiting-bar); color: #fff; font-size: 13px; text-decoration: none; transition: filter .15s; }
.ov-stack a:hover { filter: brightness(1.08); }
.ov-stack a.s-closed { background: var(--s-closed-bar); } .ov-stack a.s-ready_review { background: var(--s-ready_review-bar); }
.ov-stack a.s-in_progress { background: var(--s-in_progress-bar); } .ov-stack a.s-client_done { background: var(--s-client_done-bar); }
.ov-stack a.s-partial { background: var(--s-partial-bar); } .ov-stack a.s-waiting { background: var(--s-waiting-bar); }
.ov-legend { margin: 12px 0 6px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ov-legend a { color: var(--ink-2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.ov-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0 6px; }
.ov-facts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ov-facts div { background: var(--sunk); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.ov-facts b { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--ink); }
.ov-facts span { font-size: 12.5px; color: var(--muted); }
.ov-bars { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.ov-bars li { display: grid; grid-template-columns: 110px 1fr 48px; align-items: center; gap: 10px; font-size: 14px; }
.ov-bars i { height: 12px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.ov-bars em { display: block; height: 100%; background: var(--pine); border-radius: 99px; animation: grow .8s cubic-bezier(.2,.8,.2,1); transform-origin: right; }
.ov-bars b { text-align: left; font-variant-numeric: tabular-nums; }
@keyframes grow { from { transform: scaleX(0); } }
.ov-team { width: 100%; border-collapse: collapse; }
.ov-team th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.ov-team td { padding: 12px 10px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ov-team .num { text-align: center; font-variant-numeric: tabular-nums; }
.ov-mrow { display: flex; align-items: center; gap: 10px; }
.ov-meter { flex: 1; max-width: 220px; height: 10px; background: var(--sunk); border-radius: 99px; overflow: hidden; }
.ov-meter i { display: block; height: 100%; background: var(--pine); border-radius: 99px; }
.ov-team .avatar.sm { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); font-weight: 700; font-size: 13px; margin-inline-end: 6px; }
.cntb { font-weight: 700; font-size: 13px; color: #9a5b00; background: var(--mustard-soft); border-radius: 999px; padding: 1px 9px; }
.ov-trend { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding-top: 10px; }
.ov-trend div { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; }
.ov-trend i { width: 100%; max-width: 46px; background: var(--pine-soft); border-radius: 8px 8px 3px 3px; min-height: 3px; animation: rise .8s cubic-bezier(.2,.8,.2,1); transform-origin: bottom; }
.ov-trend .cur i { background: var(--pine); }
.ov-trend small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ov-trend span { font-size: 12.5px; color: var(--ink-2); }
@keyframes rise { from { transform: scaleY(0); } }
.ov-save { list-style: none; padding: 0; margin: 0; }
.ov-save li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.ov-save li.tot { border-bottom: 0; font-size: 16px; font-weight: 700; color: var(--pine); }
@media (max-width: 1100px) { .ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov-grid { grid-template-columns: 1fr; } .ov-facts { grid-template-columns: repeat(2, 1fr); } }
.ov-scroll { overflow-x: auto; }
@media (max-width: 600px) { .ov-team th:nth-child(5), .ov-team td:nth-child(5), .ov-team th:nth-child(6), .ov-team td:nth-child(6) { display: none; } .ov-meter { max-width: 70px; } .ov-k > b { font-size: 26px; } }

/* ---------- נייד: כותרת עליונה ותפריט צף ---------- */
.mtop, .mtab, .mmore, .mmore-bg { display: none; }
@media (max-width: 860px) {
  html { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .mtop {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 30; padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
    background: rgba(21, 18, 58, .92); -webkit-backdrop-filter: saturate(1.5) blur(16px); backdrop-filter: saturate(1.5) blur(16px);
    color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.06);
  }
  .mtop-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16px; font-family: var(--display, inherit); }
  .mtop-brand:hover { text-decoration: none; }
  .mtop .mark { width: 22px; height: 28px; border-radius: 3px 7px 7px 3px; background: var(--grad); position: relative; box-shadow: 0 4px 14px rgba(176, 75, 255, .45); }
  .mtop .mark::after { content: ""; position: absolute; inset-inline-start: 50%; top: 6px; width: 6px; height: 6px; margin-inline-start: -3px; border-radius: 50%; background: #fff; opacity: .9; }
  .mtop-me { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); font-weight: 700; font-size: 15px; }

  .mtab {
    display: grid; grid-template-columns: 1fr 1fr 80px 1fr 1fr; align-items: end;
    position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 20px), 520px);
    padding: 6px; border-radius: 26px;
    background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
    border: 1px solid rgba(214, 211, 240, .9);
    box-shadow: 0 18px 40px -16px rgba(22, 20, 51, .38), 0 2px 6px rgba(22, 20, 51, .06);
  }
  .mt {
    position: relative; display: grid; justify-items: center; gap: 3px; min-height: 56px; padding: 8px 2px 6px; border-radius: 18px;
    color: var(--muted); font-size: 11.5px; font-weight: 500; line-height: 1.1; text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer;
  }
  .mt:hover { text-decoration: none; }
  .mt svg { width: 24px; height: 24px; transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
  .mt span { white-space: nowrap; }
  .mt.on { color: var(--pine); background: var(--pine-soft); font-weight: 700; }
  .mt.on svg { transform: translateY(-1px) scale(1.06); }
  .mt:active { background: var(--line); }
  .mt-n {
    position: absolute; top: 3px; inset-inline-end: calc(50% - 24px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: #ff4d6d; color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff;
  }
  .mt-fab { justify-self: center; display: grid; justify-items: center; gap: 4px; margin-top: -30px; color: var(--pine); font-size: 11.5px; font-weight: 700; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .mt-fab svg {
    width: 64px; height: 64px; padding: 19px; border-radius: 50%; color: #fff;
    background: radial-gradient(circle at 30% 25%, #8a6bff 0%, #5b3df5 55%, #4527d9 100%);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .95), 0 14px 26px -8px rgba(91, 61, 245, .75); transition: transform .1s ease;
  }
  .mt-fab:active svg { transform: scale(.94); }

  .mmore-bg:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(21, 18, 58, .45); animation: fade .2s ease both; }
  .mmore:not([hidden]) {
    display: block; position: fixed; z-index: 51; inset-inline: 0; bottom: 0; background: var(--card); border-radius: 26px 26px 0 0;
    padding: 10px 16px calc(20px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 -20px 50px -20px rgba(21, 18, 58, .5);
    animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1) both;
  }
  .mmore .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line-2); margin: 0 auto 14px; }
  .mmore-me { display: flex; align-items: center; gap: 12px; padding: 0 4px 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
  .mmore-me .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
  .mmore-me b { display: block; font-size: 16px; }
  .mmore-me small { color: var(--muted); font-size: 13px; }
  .mmore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mmore-grid a {
    display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px; border-radius: 16px; background: var(--sunk);
    border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 15px;
  }
  .mmore-grid a:hover { text-decoration: none; }
  .mmore-grid a svg { width: 24px; height: 24px; color: var(--pine); flex: none; }
  .mmore-grid a.on { background: var(--pine-soft); border-color: #d3c9ff; }
  .mmore-grid a:active { transform: scale(.98); }
  html.sheet-open, html.sheet-open body { overflow: hidden; }
  .flash { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- נייד: טבלאות ככרטיסים ---------- */
@media (max-width: 860px) {
  .table-wrap:has(> table.m-stack) { overflow: visible; }
  table.m-stack thead { display: none; }
  table.m-stack, table.m-stack tbody, table.m-stack tr, table.m-stack td { display: block; width: 100%; }
  table.m-stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
  table.m-stack tbody tr:last-child { border-bottom: 0; }
  table.m-stack td { display: block; padding: 0; border: 0; text-align: start; white-space: normal; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
  table.m-stack td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.3; margin-bottom: 1px; }
  table.m-stack td:not([data-label])::before { content: none; }
  table.m-stack td:not([data-label]) { grid-column: 1 / -1; }
  table.m-stack td.num { text-align: start; direction: rtl; font-weight: 600; }
  table.m-stack td.num::after { content: ""; }
  table.m-stack td:first-child { grid-column: 1 / -1; font-weight: 700; font-size: 16px; color: var(--ink); }
  table.m-stack td:first-child::before { content: none; }
  table.m-stack td.empty-cell { display: none; }
  table.m-stack td input, table.m-stack td select { max-width: 100%; }
  table.m-stack tr.total { background: var(--pine-soft); border-radius: 14px; padding: 12px 14px; margin-top: 8px; border: 0; }
  table.m-stack tr.total td { background: none; border: 0; }
  .card > table.m-stack, .card > .table-wrap > table.m-stack { margin: 0; }
  .card.flush table.m-stack tr { padding-inline: 16px; }
  .team-head { flex-wrap: wrap; }
  .team-head .team-title { flex: 1 1 200px; min-width: 0; }
}

/* ---------- נייד: רשימת מסמכים, כותרות עמוד, אישור ---------- */
@media (max-width: 860px) {
  main { min-width: 0; overflow-wrap: break-word; }
  .doclist thead { display: none; }
  .doclist, .doclist tbody { display: block; width: 100%; }
  .doclist tr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .doclist td { display: block; padding: 0; border: 0; white-space: normal; }
  .doclist td:nth-child(1) { grid-row: 1 / span 2; width: auto !important; }
  .doclist td:nth-child(2) { grid-column: 2; }
  .doclist td:nth-child(4) { grid-column: 3; grid-row: 1; font-weight: 700; }
  .doclist td:nth-child(5) { grid-column: 2 / -1; grid-row: 2; }
  .doclist td[colspan] { grid-column: 1 / -1; grid-row: auto; }
  .doclist .sup { min-width: 0; }
  .table-wrap:has(> .doclist) { overflow: visible; }

  /* כפתורי ראש העמוד: שורה אחת שנגללת, בלי קפיצות */
  .page-head { align-items: stretch; gap: 12px; }
  .page-head .titles { width: 100%; }
  .page-head .actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -14px; padding: 2px 14px 4px; width: calc(100% + 28px); }
  .page-head .actions::-webkit-scrollbar { display: none; }
  .page-head .actions > *, .page-head .btn-group { flex: none; }
  .page-head .btn-group { flex-wrap: nowrap; }
  .btn, button.primary, .btn.primary { min-height: 42px; }
  input, select, textarea { font-size: 16px; }   /* בלי זום אוטומטי בספארי */
}
@media (max-width: 860px) {
  .approve-bar {
    position: fixed; z-index: 35; inset-inline: 14px; bottom: calc(98px + env(safe-area-inset-bottom, 0px)); margin: 0 auto; max-width: 520px;
    filter: drop-shadow(0 12px 22px rgba(15, 157, 116, .35));
  }
  .approve-bar button { min-height: 54px; border-radius: 18px; font-size: 17px; }
  body:has(.approve-bar) main { padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px)); }
  .viewer { height: 52vh; }
}
@media (hover: none), (pointer: coarse) { .kbd, .hint { display: none !important; } }
@media (max-width: 860px) {
  .spine, .kbd, .pill, .tag, .btn, .count, .mt-n { overflow-wrap: normal; white-space: nowrap; }
  .doclist td.hide-sm { display: none; }
}
@media (max-width: 860px) {
  .msg-card .card-head { flex-wrap: wrap; align-items: flex-start; }
  .msg-card .who { flex-wrap: wrap; gap: 4px 10px !important; flex: 1 1 100%; }
  .msg-card .who .muted { flex-basis: 100%; }
  .msg-card .card-head form { margin-inline-start: auto; }
}
@media (max-width: 600px) {
  .ov-kpis { gap: 10px; }
  .ov-k { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .kpis > div { flex: 1 1 130px; }
  .kpis b { font-size: 21px; }
}
@media print { .mtop, .mtab, .mmore, .mmore-bg { display: none !important; } }

/* ==================================================   משימות (במקום פתקים) ולוח מועדים
   ========================================================= */
.mt-n.dot-only { min-width: 11px; width: 11px; height: 11px; padding: 0; top: 7px; inset-inline-end: calc(50% - 16px); }
.mmore-grid a { position: relative; }
.mm-n { position: absolute; top: 8px; inset-inline-end: 10px; font-style: normal; font-size: 11px; font-weight: 700; background: #ff4d6d; color: #fff; border-radius: 999px; padding: 0 6px; line-height: 18px; }
.plain-link { color: inherit; }
.tabs a .n.hot { background: #ff4d6d; border-color: #ff4d6d; color: #fff; }
.tabs .tab-end { margin-inline-start: auto; color: var(--pine); font-weight: 600; }

/* --- שורת משימה חדשה --- */
.composer { padding: 14px 16px; margin-bottom: 18px; border: 1px solid #ddd5ff; box-shadow: 0 10px 30px -18px rgba(91, 61, 245, .45); }
.cmp-main { display: flex; align-items: center; gap: 10px; }
.cmp-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.cmp-ico svg { width: 20px; height: 20px; }
.cmp-main input { flex: 1; min-width: 0; font-size: 17px; border: 0; background: transparent; padding: 10px 4px; box-shadow: none; }
.cmp-main input:focus { outline: none; box-shadow: none; }
.cmp-send { min-height: 42px; padding-inline: 22px; }
.cmp-opts { display: flex; flex-wrap: wrap; gap: 10px 22px; padding-top: 12px; margin-top: 8px; border-top: 1px dashed var(--line-2); }
.cmp-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cmp-label { font-size: 12px; color: var(--muted); font-weight: 600; margin-inline-end: 2px; }
.cmp-client input { width: 200px; padding-block: 6px; }
.cmp-client select, .cmp-date { padding-block: 6px; }
.who-chip, .when-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 999px; margin: 0;
  border: 1px solid var(--line-2); background: #fff; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: background .12s, border-color .12s;
}
.when-chip { padding: 5px 12px; }
.who-chip input, .when-chip input { position: absolute; opacity: 0; pointer-events: none; }
.who-chip .avatar { width: 24px; height: 24px; font-size: 11px; }
.who-chip:has(input:checked), .when-chip:has(input:checked) { background: var(--pine-soft); border-color: var(--pine); color: var(--pine); font-weight: 600; }
.who-chip:has(input:focus-visible), .when-chip:has(input:focus-visible) { outline: 2px solid var(--pine); outline-offset: 2px; }
.who-pick { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- רשימת משימות --- */
.tgroup { padding: 4px 0 8px; }
.tgroup + .tgroup { border-top: 1px solid var(--line); }
.tgroup-h { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 18px 6px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.tgroup-h .n { font-size: 12px; background: var(--sunk); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 18px; font-weight: 600; }
.g-overdue .tgroup-h { color: var(--red); }
.g-today .tgroup-h { color: var(--pine); }
.tlist { list-style: none; margin: 0; padding: 0 8px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; transition: background .12s, opacity .4s, transform .4s; }
.trow:hover { background: var(--sunk); }
.trow.has-new { background: linear-gradient(90deg, transparent, rgba(91, 61, 245, .06)); }
.trow.leaving { opacity: 0; transform: translateX(-24px); }
.tcheck {
  width: 26px; height: 26px; min-height: 0; padding: 0; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; flex: none;
  display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s, transform .15s; cursor: pointer;
}
.tcheck svg { width: 15px; height: 15px; }
.tcheck:hover { border-color: var(--ok); color: rgba(15, 157, 116, .45); background: #fff; }
.tcheck.on { background: var(--ok); border-color: var(--ok); color: #fff; animation: pop .35s cubic-bezier(.2, .8, .2, 1.4); }
.tcheck.lg { width: 34px; height: 34px; }
.tcheck.lg svg { width: 19px; height: 19px; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: none; } }
.tmain { flex: 1; min-width: 0; color: var(--ink); display: grid; gap: 3px; }
.tmain:hover { text-decoration: none; }
.tmain:hover .ttext { color: var(--pine); }
.ttext { font-weight: 500; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.is-done .ttext { text-decoration: line-through; color: var(--muted); }
.tmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--muted); }
.tclient { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
.tclient .spine, .ob .spine { min-width: 38px; height: 20px; font-size: 11px; padding: 0 6px; }
.due-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; background: var(--sunk); color: var(--ink-2); font-weight: 600; font-size: 12px; white-space: nowrap; }
.due-chip svg { width: 13px; height: 13px; }
.due-chip.d-overdue { background: var(--red-soft); color: var(--red); }
.due-chip.d-today { background: var(--pine-soft); color: var(--pine); }
.due-chip.d-tomorrow { background: var(--mustard-soft); color: var(--mustard); }
.done-by { color: var(--ok); font-weight: 600; }
.from { white-space: nowrap; }
.new-pill { font-size: 11.5px; font-weight: 700; color: #fff; background: var(--pine); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.t-av { width: 28px; height: 28px; font-size: 12px; }
.tempty { padding: 40px 20px; }
.tlist.compact { padding: 0; margin-bottom: 10px; }
.tlist.compact .trow { padding: 6px 2px; }
.addline.wrap { flex-wrap: wrap; }
.addline.wrap input[name=text] { flex: 1 1 220px; }

/* עדכונים */
.updates { list-style: none; margin: 0; padding: 6px 8px; }
.updates li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 10px; border-radius: 12px; position: relative; }
.updates li + li { border-top: 1px solid var(--line); }
.updates li.new { background: rgba(91, 61, 245, .05); }
.updates .u-body { flex: 1; min-width: 0; font-size: 14px; }
.updates .u-text { margin-top: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 6px 10px; color: var(--ink-2); }
.updates .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }
.new-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pine); margin-top: 6px; box-shadow: 0 0 0 4px rgba(91, 61, 245, .15); }
.updates li.empty { display: block; border: 0; }

/* עמוד משימה */
.task-page { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.task-top { display: flex; gap: 14px; align-items: flex-start; }
.task-title { font-size: 24px; line-height: 1.35; overflow-wrap: anywhere; }
.task-card.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.done-banner { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--ok-soft); color: #0a6b4f; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.task-facts { margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.task-facts div { min-width: 0; }
.task-facts dt { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 3px; }
.task-facts dd { margin: 0; font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.task-facts .spine { min-width: 38px; height: 22px; font-size: 11px; }
.tlog { list-style: none; margin: 0 0 14px; padding: 0; position: relative; }
.tlog::before { content: ""; position: absolute; inset-inline-start: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tlog li { display: flex; gap: 14px; padding: 8px 0; position: relative; font-size: 14px; }
.tlog .ev-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--line-2); flex: none; margin-top: 3px; z-index: 1; }
.tlog .ev-assigned .ev-dot { border-color: var(--pine); }
.tlog .ev-done .ev-dot { border-color: var(--ok); background: var(--ok); }
.tlog .ev-comment .ev-dot { border-color: #9d8cff; }
.tlog .meta { font-size: 12px; color: var(--muted); margin-inline-start: 6px; }
.tlog .ev-text { margin-top: 4px; background: var(--sunk); border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; padding: 7px 11px; white-space: pre-wrap; }

/* --- לוח מועדים --- */
.dl-body { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: center; margin-top: 20px; }
.countdown { display: grid; justify-items: center; text-align: center; min-width: 150px; padding: 14px 18px; border-radius: 20px; background: rgba(10, 8, 40, .35); border: 1px solid rgba(255,255,255,.1); }
.cd-n { font-family: var(--display); font-size: 58px; font-weight: 800; line-height: 1; background: linear-gradient(180deg, #fff, #c9bfff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cd-l { font-size: 13px; color: #d6d1ff; margin-top: 6px; }
.cd-d { font-size: 13px; font-weight: 600; color: #fff; margin-top: 2px; }
.kind-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.kind-card { --kp: 0; display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); color: #fff; transition: background .15s, transform .15s; }
.kind-card:hover { background: rgba(255,255,255,.12); text-decoration: none; transform: translateY(-2px); }
.kind-card.on { background: rgba(157, 140, 255, .28); border-color: rgba(201, 191, 255, .6); }
.kc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.kc-name { font-weight: 600; }
.kc-due { color: #c9c3ff; font-variant-numeric: tabular-nums; }
.kc-num b { font-family: var(--display); font-size: 26px; font-weight: 700; }
.kc-num small { color: #b7b0f0; font-size: 14px; }
.kc-num span { color: #d6d1ff; font-size: 13px; }
.kc-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.kc-bar i { display: block; height: 100%; width: calc(var(--kp) * 1%); border-radius: 6px; background: linear-gradient(90deg, #9d8cff, #c9bfff); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.kind-card.all-done .kc-bar i { background: #43d6a6; }
.kc-open { font-size: 12px; color: #c9c3ff; }
.kind-card.all-done .kc-open { color: #7ff0c6; }
.rail { display: grid; grid-template-columns: repeat(31, minmax(0, 1fr)); gap: 4px; margin-top: 18px; }
.rd { display: grid; justify-items: center; gap: 1px; padding: 6px 0 5px; border-radius: 10px; color: rgba(255,255,255,.55); font-size: 11px; position: relative; min-height: 52px; }
.rd-w { font-size: 10px; opacity: .8; }
.rd-n { font-weight: 600; font-size: 13px; color: rgba(255,255,255,.75); }
.rd.wknd { opacity: .6; }
.rd.past { opacity: .4; }
.rd.has { background: rgba(157, 140, 255, .22); color: #fff; opacity: 1; }
.rd.has .rd-n { color: #fff; }
.rd-c { font-size: 10.5px; font-weight: 700; background: #ff6b85; color: #fff; border-radius: 999px; padding: 0 6px; line-height: 15px; margin-top: 2px; }
.rd.clear .rd-c { background: #2fbf8f; }
.rd.today { box-shadow: inset 0 0 0 2px #fff; color: #fff; }
.dl-empty { margin: 16px 0 0; color: #d6d1ff; }
.dl-empty a { color: #fff; text-decoration: underline; }

.dl-table th.c-kind, .dl-table td.c-kind { text-align: center; width: 96px; }
.dl-table th.focus { color: var(--pine); }
.dl-table td.focus { background: rgba(91, 61, 245, .035); }
.dl-table .c-sel { width: 40px; }
.dl-table .who { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.dl-table .who .spine { min-width: 44px; height: 24px; font-size: 12px; }
.dl-table .c-client .small { display: block; margin-inline-start: 54px; }
.dl-table td { padding-block: 8px; }
.dl-cell {
  display: inline-grid; justify-items: center; align-content: center; gap: 0; width: 84px; min-height: 40px; padding: 3px 6px; border-radius: 12px;
  font-size: 12.5px; line-height: 1.2; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); cursor: pointer; transition: transform .12s, background .12s;
}
.dl-cell:hover { transform: translateY(-1px); border-color: var(--pine); }
.dl-cell .dd { font-weight: 700; font-size: 13px; }
.dl-cell .per { font-size: 11px; color: var(--muted); }
.dl-cell.st-done { background: var(--ok-soft); border-color: #a5e6cf; color: #0a6b4f; }
.dl-cell.st-done .ck { font-weight: 800; font-size: 15px; }
.dl-cell .by { font-size: 11.5px; font-weight: 600; }
.dl-cell.st-skip { background: var(--sunk); color: var(--muted); border-style: dashed; }
.dl-cell.late { background: var(--red-soft); border-color: #f5b5c0; color: var(--red); }
.dl-cell.late .per { color: var(--red); }
.dl-cell.pop { animation: pop .35s cubic-bezier(.2, .8, .2, 1.4); }
.dl-none { color: var(--line-2); font-size: 20px; }
.dl-note { padding: 12px 18px 16px; margin: 0; }
.bulkbar {
  position: fixed; z-index: 45; bottom: 22px; left: 50%; transform: translateX(-50%); margin-inline-start: calc(var(--side) / 2);
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 18px; background: var(--pine-deep); color: #fff;
  box-shadow: 0 18px 40px -12px rgba(21, 18, 58, .6); animation: toast-in .2s ease-out;
}
.bulkbar[hidden] { display: none; }
.bulkbar b { font-family: var(--display); font-size: 18px; }
.bulkbar .link { color: #c9c3ff; }
.bulkbar .ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }
.savebar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(255,255,255,.94); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.setup-table td { vertical-align: middle; }
.setup-table .spine { min-width: 44px; height: 24px; font-size: 12px; }
.chip-toggle.on-chip { background: var(--pine-soft); border-color: var(--pine); color: var(--pine); }

/* בתיק הלקוח */
.ob-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ob { display: grid; gap: 6px; align-content: start; padding: 12px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); font-size: 14px; }
.ob-k { font-size: 12px; font-weight: 700; color: var(--muted); }
.ob .chip-toggle { justify-self: start; }
.dl-mini { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.dl-mini li { display: grid; grid-template-columns: 1.3fr 1.2fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; font-size: 13.5px; }
.dl-mini li:nth-child(odd) { background: var(--sunk); }
.dl-mini .st { font-weight: 600; font-size: 12.5px; }
.dl-mini .st-done .st { color: var(--ok); }
.dl-mini .late .st { color: var(--red); }

/* פס "היום שלי" בלוח הראשי */
.agenda-strip { display: grid; grid-template-columns: auto auto minmax(240px, 1fr); gap: 12px; margin: -4px 0 18px; }
.ag-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.ag-item:hover { text-decoration: none; transform: translateY(-2px); border-color: #d3c9ff; }
.ag-item b { display: block; font-size: 15px; }
.ag-item small { color: var(--muted); font-size: 12.5px; }
.ag-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--pine-soft); color: var(--pine); flex: none; }
.ag-ico svg { width: 20px; height: 20px; }
.ag-item.hot .ag-ico { background: var(--red-soft); color: var(--red); }
.ag-quick { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 16px; background: var(--card); border: 1px dashed #cfc4ff; }
.ag-quick input { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; }
.ag-quick input:focus { outline: none; box-shadow: none; }
.ag-quick button { width: 36px; height: 36px; padding: 0; font-size: 20px; border-radius: 12px; }

@media (max-width: 1100px) {
  .task-page { grid-template-columns: 1fr; }
  .agenda-strip { grid-template-columns: 1fr 1fr; }
  .ag-quick { grid-column: 1 / -1; }
  .dl-body { grid-template-columns: 1fr; }
  .countdown { grid-template-columns: auto auto; justify-content: start; justify-items: start; gap: 2px 14px; text-align: start; }
  .countdown .cd-n { grid-row: span 2; }
}
@media (max-width: 860px) {
  .composer { padding: 12px; }
  .cmp-main input { font-size: 16px; }
  .cmp-opts { gap: 12px; }
  .cmp-group { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; width: 100%; padding-bottom: 2px; }
  .cmp-group::-webkit-scrollbar { display: none; }
  .who-chip, .when-chip { flex: none; }
  .cmp-client { flex-wrap: wrap; }
  .cmp-client input { flex: 1 1 160px; width: auto; }
  .tlist { padding: 0 4px; }
  .trow { padding: 10px 8px; }
  .tcheck { width: 30px; height: 30px; }
  .task-facts { grid-template-columns: 1fr; }
  .task-title { font-size: 20px; }
  .agenda-strip { grid-template-columns: 1fr; margin-top: 0; }
  .rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40px; overflow-x: auto; scrollbar-width: none; margin-inline: -8px; padding: 0 8px; }
  .rail::-webkit-scrollbar { display: none; }
  .kind-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-n { font-size: 44px; }
  /* טבלת המועדים הופכת לכרטיסים: לקוח למעלה, תאים בשורה */
  .dl-table thead { display: none; }
  .dl-table, .dl-table tbody { display: block; width: 100%; }
  .dl-table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .dl-table td { display: block; padding: 0; border: 0; }
  .dl-table td.c-sel { order: 0; width: auto; }
  .dl-table td.c-client { flex: 1 1 0; min-width: 0; order: 1; }
  .dl-table td.c-client .small { margin-inline-start: 0; }
  .dl-table td.c-kind { width: auto; order: 2; display: grid; justify-items: center; gap: 3px; }
  .dl-table td.c-kind::before { content: attr(data-label); font-size: 11px; color: var(--muted); font-weight: 600; }
  .dl-table td.c-kind:has(.dl-none) { display: none; }
  .dl-table tr:has(td.c-kind) td.c-kind:first-of-type { margin-inline-start: 0; }
  .dl-table td.c-client { flex-basis: calc(100% - 48px); }
  .dl-cell { width: 76px; min-height: 42px; }
  .bulkbar { margin-inline-start: 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); flex-wrap: wrap; justify-content: center; }
  .tabs .tab-end { margin-inline-start: 0; }
  .ob-grid { grid-template-columns: 1fr; }
  .dl-mini li { grid-template-columns: 1fr auto; }
  .savebar { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; border: 1px solid var(--line); margin: 8px; }
}
@media (max-width: 860px) {
  /* שורת משימה חדשה: האפשרויות נפתחות רק כשמתחילים לכתוב */
  .composer:not(:focus-within):not(:has(#cmp-text:not(:placeholder-shown))) .cmp-opts { display: none; }
  .cmp-send { padding-inline: 16px; }
  .tasks-head .sub { display: none; }
  /* לוח מועדים בנייד: כרטיסים בשורה נגללת, ספירה לאחור קומפקטית */
  .dl-hero { padding: 18px 16px 16px; }
  .dl-hero .hero-top { flex-wrap: nowrap; align-items: center; }
  .dl-hero h1 { font-size: 26px; }
  .dl-hero .today { display: none; }
  .dl-body { gap: 12px; margin-top: 14px; }
  .countdown { padding: 10px 14px; min-width: 0; }
  .cd-n { font-size: 36px; }
  .kind-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 62%; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin-inline: -16px; padding: 0 16px; }
  .kind-cards::-webkit-scrollbar { display: none; }
  .kind-card { scroll-snap-align: start; padding: 10px 12px; }
  .kc-num b { font-size: 22px; }
  .rail { margin-top: 12px; }
}
body.has-bulk .flash { bottom: 96px; }
@media (max-width: 860px) { .dl-hero h1 { white-space: nowrap; } body.has-bulk .flash { bottom: calc(190px + env(safe-area-inset-bottom, 0px)); } }
/* ---------- הכנסות ---------- */
:root { --in: #12a37a; --in-soft: #e2f6ef; --in-line: #b6e8d6; }
.dir-badge { display: inline-block; vertical-align: 4px; font-family: var(--font); font-size: 12.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; letter-spacing: 0; }
.dir-badge.in { background: var(--in-soft); color: var(--in); border: 1px solid var(--in-line); }
.dir-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 12px; }
.dir-seg { display: inline-flex; padding: 3px; gap: 3px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--line); }
.dir-seg form { display: contents; }
.dir-seg button { border: none; background: none; padding: 6px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); min-height: 34px; }
.dir-seg button:not(:disabled):hover { color: var(--ink); }
.dir-seg button.on { background: var(--card); color: var(--pine); box-shadow: var(--shadow); }
.dir-seg button.on.income { color: var(--in); }
.dir-seg button:disabled { cursor: default; }
.kpis .in b { color: #8ef3cf; }
.kpis .bal { background: rgba(91, 61, 245, .35); border-color: rgba(157, 139, 255, .5); }
.kpis .bal.refund { background: rgba(18, 163, 122, .3); border-color: rgba(95, 224, 180, .45); }
tr.is-in td:first-child { box-shadow: inset -3px 0 0 var(--in); }
.io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 4px; }
.io > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--sunk); }
.io span { display: block; font-size: 12.5px; color: var(--muted); }
.io b { font-family: var(--display, var(--font)); font-size: 22px; font-weight: 700; direction: ltr; display: block; text-align: right; }
.io .in b { color: var(--in); }
.io-bar { display: flex; gap: 3px; height: 8px; margin: 10px 0 14px; }
.io-bar span { border-radius: 999px; min-width: 6px; }
.io-bar .i { background: var(--in); }
.io-bar .o { background: var(--pine); }
.vat-calc { display: grid; gap: 2px; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--pine-soft); }
.vat-calc.refund { background: var(--in-soft); }
.vat-calc div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.vat-calc div.eq { border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 16px; }
@media (max-width: 700px) { .io b { font-size: 18px; } }
/* ---------- בדיקות: מספר הקצאה וכפילויות ---------- */
.risk-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 0 0 14px; }
.risk { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); background: var(--card); transition: transform .15s, box-shadow .15s; }
.risk:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.risk .risk-ico, .chk-panel .chk-ico { width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center; font: 800 18px/1 var(--display); color: #fff; }
.risk.r-alloc { background: linear-gradient(135deg, #fff6e6, #fffaf2); border-color: var(--mustard-line); }
.risk.r-alloc .risk-ico, .p-alloc .chk-ico { background: linear-gradient(135deg, #ff9f1c, #f06b2b); box-shadow: 0 0 16px rgba(240,107,43,.45); }
.risk.r-dup { background: linear-gradient(135deg, #f1edff, #f8f6ff); border-color: #d9d0ff; }
.risk.r-dup .risk-ico, .p-dup .chk-ico { background: var(--grad); box-shadow: 0 0 16px rgba(91,61,245,.5); }

.chk-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; border: 1px solid; text-decoration: none; white-space: nowrap; }
.chk.c-alloc { background: #fff3e0; color: #a14a00; border-color: #ffd3a1; }
.chk.c-alloc::before { content: "#"; font-weight: 800; }
.chk.c-dup { background: var(--pine-soft); color: var(--pine); border-color: #d9d0ff; }
.chk.c-dup::before { content: "⧉"; }

.chk-panel { border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 14px; border: 1px solid; }
.chk-panel.p-alloc { background: linear-gradient(135deg, #fff6e6, #fffbf4); border-color: var(--mustard-line); }
.chk-panel.p-dup { background: linear-gradient(135deg, #f1edff, #faf9ff); border-color: #d9d0ff; }
.chk-head { display: flex; gap: 12px; align-items: flex-start; }
.chk-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; padding-inline-start: 48px; }
.dup-twin { display: flex; gap: 12px; align-items: center; margin: 10px 0 0; margin-inline-start: 48px; padding: 8px; border-radius: 10px; background: var(--card);
  border: 1px dashed #cfc4ff; color: var(--ink); text-decoration: none; transition: border-color .15s; }
.dup-twin:hover { border-color: var(--pine); }
.dup-twin img, .dup-twin .pdf { width: 46px; height: 58px; border-radius: 7px; object-fit: cover; flex: none; box-shadow: 0 6px 14px -8px rgba(21,18,58,.6); }
.dup-twin .pdf { display: grid; place-items: center; background: var(--sunk); font: 700 11px/1 var(--display); color: var(--muted); }
.flag.f-duplicate { background: var(--pine-soft); color: var(--pine); border-color: #d9d0ff; }
.flag.f-duplicate::before { content: "⧉"; }
@media (max-width: 640px) {
  .chk-actions, .dup-twin { padding-inline-start: 0; margin-inline-start: 0; }
  .chk-actions button, .chk-actions form { flex: 1 1 auto; }
  .chk-actions form button { width: 100%; }
}
.chk-panel .ltr, .risk .ltr { white-space: nowrap; unicode-bidi: isolate; }

/* הודעה קולית: תגית, נגן ותמלול */
.voice-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--accent, #6d4aff); background: rgba(109,74,255,.09); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; white-space: nowrap; }
.voice-player { display: block; width: 100%; max-width: 280px; height: 34px; margin: 4px 0 6px; }

/* ---------- מס הכנסה: הערכה, שיעורי הכרה ורכוש קבוע ---------- */
:root { --tax: #2f6bff; --tax-soft: #eaf0ff; --tax-line: #c9d8ff; --asset: #b2459b; --asset-soft: #fbeaf6; --asset-line: #f0c6e6; }
.tag.est { background: var(--tax-soft); color: var(--tax); border: 1px solid var(--tax-line); font-size: 12px; vertical-align: 3px; }
.pct-in { position: relative; display: inline-flex; align-items: center; }
.pct-in input { padding-right: 28px; width: 100%; text-align: right; direction: ltr; }
.pct-in i { position: absolute; right: 11px; font-style: normal; color: var(--muted); font-size: 13px; pointer-events: none; }
.pct-in.sm input { width: 76px; padding-top: 5px; padding-bottom: 5px; }

.tax-card { position: relative; overflow: hidden; }
.tax-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tax), var(--pine)); }
.tax-flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.tax-flow > div { flex: 1 1 120px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--sunk); min-width: 0; }
.tax-flow > i { align-self: center; font: 700 20px/1 var(--display); color: var(--muted); font-style: normal; }
.tax-flow span { display: block; font-size: 12.5px; color: var(--muted); }
.tax-flow b { display: block; font: 700 20px/1.25 var(--display); direction: ltr; text-align: right; white-space: nowrap; }
.tax-flow em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.tax-flow .res { background: var(--tax-soft); border-color: var(--tax-line); }
.tax-flow .res b { color: var(--tax); }
.tax-flow .res.neg { background: var(--red-soft); border-color: #ffc9d2; }
.tax-flow .res.neg b { color: var(--red); }
.tax-adv { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--tax-soft), #f5f2ff); }
.tax-adv b { font: 800 22px/1 var(--display); color: var(--tax); direction: ltr; }
.tax-adv .btn { margin-inline-start: auto; }
.tax-year { margin-top: 14px; border-top: 1px dashed var(--line-2); padding-top: 12px; }
.tax-year h3 { margin: 0 0 10px; font-size: 15px; }
.ty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ty-grid > div { padding: 2px 0; }
.ty-grid span { display: block; font-size: 12.5px; color: var(--muted); }
.ty-grid b { display: block; font: 700 18px/1.3 var(--display); direction: ltr; text-align: right; }
.ty-grid em { display: block; font-style: normal; font-size: 12px; color: var(--muted); }
.tax-gap { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); }
.gap-bars { display: grid; gap: 5px; margin-bottom: 10px; }
.gap-bars .b { display: block; height: 8px; border-radius: 999px; min-width: 6px; }
.gap-bars .tax { background: linear-gradient(90deg, var(--tax), #6f95ff); }
.gap-bars .adv { background: linear-gradient(90deg, var(--ok), #4fd1a8); }
.gap-txt { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; }
.gap-txt span:first-child::before, .gap-txt span:nth-child(2)::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 6px; }
.gap-txt span:first-child::before { background: var(--tax); }
.gap-txt span:nth-child(2)::before { background: var(--ok); }
.gap-txt strong { flex-basis: 100%; margin-top: 4px; }
.tax-gap.g-up { border-color: #ffd98a; background: #fffcf5; }
.tax-gap.g-down, .tax-gap.g-ok { border-color: #b6e8d6; background: #f6fdfa; }
.brk { margin-top: 10px; }
.brk summary { cursor: pointer; color: var(--pine); }
.brk table { margin-top: 8px; }
.warn-txt { color: var(--mustard); }

.recog { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--sunk); }
.recog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.recog-head h3 { margin: 0; font-size: 15px; }
.rc-src { font-size: 12px; font-weight: 600; color: var(--pine); background: var(--pine-soft); border-radius: 999px; padding: 2px 10px; }
.rc-why { margin: 8px 0 10px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); padding: 8px 10px; border-radius: 10px; background: var(--card); border: 1px dashed var(--line-2); }
.rc-row { display: grid; grid-template-columns: 1.3fr 92px 1fr; gap: 6px 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rc-k > span, .rc-v > span { display: block; font-size: 12px; color: var(--muted); }
.rc-k b { font: 700 15px/1.3 var(--display); }
.rc-k em { display: block; font-style: normal; font-size: 11.5px; color: var(--muted); }
.rc-v { text-align: left; }
.rc-v b { font: 800 17px/1.2 var(--display); color: var(--tax); }
.rc-exp .rc-v b { color: var(--ok); }
.rc-dep .rc-v b { color: var(--asset); }
.rc-in .pct-in input { padding-top: 6px; padding-bottom: 6px; font-weight: 700; }
.rc-s { grid-column: 1 / -1; }
.recog .rc-dep { display: none; }
.recog.is-asset .rc-dep { display: grid; }
.recog.is-asset .rc-exp { display: none; }
.src { display: inline; font-size: 12px; line-height: 1.5; color: var(--muted); }
.src b { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 0 6px; margin-inline-end: 4px; }
.src.lv-reg b { background: var(--ok-soft); color: var(--ok); }
.src.lv-guide b { background: var(--mustard-soft); color: var(--mustard); }
.src.lv-office b { background: var(--asset-soft); color: var(--asset); }
.src a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-2); }
.rc-bar { display: flex; gap: 2px; height: 10px; margin: 10px 0 6px; border-radius: 999px; overflow: hidden; background: var(--line); }
.rc-bar span { min-width: 0; }
.b-ok { background: var(--ok); } .b-vat { background: var(--tax); } .b-no { background: #c9c7dc; }
.rc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.rc-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.rc-foot { margin: 10px 0 0; }
.asset-toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px dashed var(--asset-line); background: var(--card); cursor: pointer; }
.asset-toggle:has(input:checked) { background: var(--asset-soft); border-style: solid; }
.asset-toggle input { margin-top: 3px; accent-color: var(--asset); }
.asset-class { margin-top: 8px; }
.asset-strip { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--asset-soft); border: 1px solid var(--asset-line); font-size: 14px; }
.asset-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #d05bb5, #8d3bd6); flex: none; }
.asset-strip a { margin-inline-start: auto; }

.recog-own { margin-top: 10px; }
.recog-own summary { cursor: pointer; padding: 6px 0; }
.recog-t td, .asset-t td { vertical-align: middle; }
.recog-t tr.own td:first-child { box-shadow: inset -3px 0 0 var(--pine); }
.asset-t tr.sold { opacity: .6; }
.row-edit summary { cursor: pointer; color: var(--pine); }
.row-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; min-width: 260px; }
.add-asset { margin-top: 12px; }
.add-asset summary { cursor: pointer; color: var(--pine); font-weight: 600; }
.add-asset form { margin-top: 10px; align-items: end; }
.ro { padding: 9px 0; font-weight: 600; }
.rate-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.rate-cell { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--sunk); }
.rate-cell em { font-style: normal; }
@media (max-width: 700px) {
  .tax-flow > i { display: none; }
  .tax-flow > div { flex-basis: calc(50% - 4px); }
  .tax-flow b { font-size: 17px; }
  .ty-grid { grid-template-columns: 1fr 1fr; }
  .ty-grid > div:last-child { grid-column: 1 / -1; }
  .recog-row { grid-template-columns: 1fr 1fr; }
}

.asset-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.asset-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--sunk); }
.asset-list li.sold { opacity: .6; }
.al-main { display: grid; gap: 2px; min-width: 0; }
.al-nums { color: var(--ink-2); }
.al-dep { text-align: left; }
.al-dep span { display: block; }
.al-dep b { font: 700 18px/1.2 var(--display); color: var(--asset); white-space: nowrap; }
.asset-list .row-edit { grid-column: 1 / -1; }
.asset-total { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--asset-soft); font-size: 14px; }
/* תיבת ההודעות: שיחה רציפה עם הלקוח */
.chat.conv { overflow-y: auto; }
.bubble.in.waiting { box-shadow: 0 0 0 2px var(--pine-soft, #ece8ff), 0 1px 0 rgba(0,0,0,.05); }
.tag.conv-tag { background: var(--pine-soft, #ece8ff); color: var(--pine, #5b3df5); border-color: #d9d0ff; }

/* איפוס או מחיקת לקוח */
.danger-zone { border-color: rgba(200, 40, 40, .25); }
.danger-zone summary { cursor: pointer; list-style: none; }
.danger-zone summary h2 { display: inline; font-size: 16px; color: var(--red); }
.danger-zone .wipe-form { display: grid; gap: 10px; margin-top: 8px; max-width: 460px; }
.danger-zone button.danger { justify-self: start; border-color: var(--red); }

/* ---------- מסמכי קבע בתיק הלקוח ---------- */
.cf-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.cf-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 4px 12px; align-items: start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.cf-row.v-expired { border-color: #f6c7c1; background: linear-gradient(90deg, var(--red-soft), var(--card) 40%); }
.cf-row.v-soon { border-color: var(--mustard-line); }
.cf-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--sunk); font-size: 18px; }
.cf-main { display: grid; gap: 4px; min-width: 0; }
.cf-t { font-weight: 600; color: var(--ink); text-decoration: none; }
.cf-t:hover { color: var(--pine); }
.cf-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.muted-tag { opacity: .7; }
.cf-edit { grid-column: 1 / -1; }
.cf-edit[open] { padding-top: 6px; border-top: 1px dashed var(--line); }
.cf-edit summary { list-style: none; cursor: pointer; display: inline-block; }
.cf-edit summary::-webkit-details-marker { display: none; }
.cf-row > .cf-edit:not([open]) { grid-column: 3; grid-row: 1; }
.cf-form, .cf-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; align-items: end; }
.cf-form .actions, .cf-add > button { margin-bottom: 12px; }
.cf-add { padding-top: 12px; border-top: 1px solid var(--line); }
.cf-add .chip-toggle, .cf-form .chip-toggle { margin-bottom: 14px; align-self: center; }
/* קבלה שפוצלה מקובץ עם כמה קבלות */
.split-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--radius-sm); margin: 0 0 14px; background: var(--pine-soft); border: 1px solid #dcd4ff; }
.split-note .cc-ico { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: var(--pine); color: #fff; }
.split-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.split-parts a { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 8px; display: inline-grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13px; }
.split-parts a.st-approved { border-color: var(--ok); color: var(--ok); }
.split-parts a.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.split-parts a.src { background: none; border: none; color: var(--pine); font-weight: 500; }

/* ---------- עדכוני רשויות ---------- */
.upd-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.upd-fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.upd-fact small { color: var(--muted); font-size: 12.5px; }
.upd-fact b { font: 700 20px/1.25 var(--display); color: var(--ink); }
.upd-fact span { color: var(--muted); font-size: 12.5px; }
.upd-fact.hot { border-color: var(--pine); background: linear-gradient(180deg, var(--pine-soft), var(--card) 70%); }
.upd-fact.hot b { color: var(--pine); }
.upd-h { font: 700 17px/1.3 var(--display); margin: 22px 2px 10px; }
.upd-h .muted { font: 400 13px var(--font); }
.upd-card { position: relative; }
.upd-card.imp-high { border-inline-start: 4px solid var(--pine); }
.upd-card h3 { margin: 6px 0 4px; font-size: 16.5px; }
.upd-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.u-cat { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 600; }
.upd-dates { color: var(--muted); display: inline-flex; gap: 10px; margin-inline-start: auto; }
.upd-sum { color: var(--ink-2); margin: 4px 0 10px; line-height: 1.55; }
.upd-change { display: flex; align-items: stretch; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.uc-side { flex: 1 1 180px; border-radius: 12px; padding: 10px 14px; border: 1px solid var(--line); background: var(--sunk); }
.uc-side small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.uc-side b { font-size: 15px; }
.uc-side.was b { color: var(--ink-2); font-weight: 600; }
.uc-side.to { background: var(--pine-soft); border-color: rgba(91, 61, 245, .35); }
.uc-side.to b { color: var(--pine); }
.uc-arrow { align-self: center; color: var(--muted); font-size: 20px; }
.upd-br { border-collapse: collapse; font-size: 13px; margin: 4px 0 10px; min-width: 260px; }
.upd-br th, .upd-br td { padding: 4px 12px; border-bottom: 1px solid var(--line); text-align: start; }
.upd-br th { color: var(--muted); font-weight: 600; }
.upd-act { margin: 6px 0; font-size: 14px; color: var(--ink-2); }
.upd-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.upd-btns { display: inline-flex; gap: 8px; }
.upd-btns form { display: contents; }
.u-src { font-size: 13px; font-weight: 600; color: var(--pine); text-decoration: none; }
.u-src:hover { text-decoration: underline; }
.upd-list { list-style: none; margin: 0; padding: 0; }
.upd-list li { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 18px; }
.upd-list li + li { border-top: 1px solid var(--line); }
.upd-list li.imp-high { box-shadow: inset -4px 0 0 var(--pine); }
.upd-list .ul-main { min-width: 0; flex: 1; }
.upd-list .ul-main > b { display: block; margin: 4px 0 2px; }
.upd-list p { margin: 2px 0 6px; color: var(--ink-2); font-size: 14px; }
.upd-hist summary { cursor: pointer; font-weight: 600; }
.upd-hist .upd-list li { padding-inline: 0; }
.upd-running { display: flex; align-items: center; gap: 10px; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--pine-soft); border-top-color: var(--pine); animation: upd-spin .9s linear infinite; flex: none; }
@keyframes upd-spin { to { transform: rotate(360deg); } }

/* פופ-אפ */
.upop-bg { position: fixed; inset: 0; z-index: 90; background: rgba(21, 18, 58, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: upop-in .18s ease-out; }
.upop { width: min(560px, 100%); max-height: min(86vh, 720px); overflow: auto; background: var(--card); border-radius: 20px; box-shadow: 0 24px 60px -18px rgba(21, 18, 58, .55); padding: 22px 22px 18px; }
.upop-head { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.upop-head small { color: var(--muted); font-size: 12.5px; }
.upop-head h2 { margin: 2px 0 0; font: 700 19px/1.3 var(--display); }
.upop-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad, var(--pine)); color: #fff; flex: none; }
.upop-ico svg { width: 24px; height: 24px; }
.upop-list { list-style: none; margin: 0; padding: 0; }
.upop-list li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.upop-list b { font-size: 15px; }
.upop-list p { margin: 0; color: var(--ink-2); font-size: 14px; }
.u-chg { font-size: 13.5px; font-weight: 600; color: var(--pine); }
.u-chg em { font-style: normal; color: var(--muted); font-weight: 400; }
.upop-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.upop-foot form { display: contents; }
@keyframes upop-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 700px) {
  .upd-strip { grid-template-columns: 1fr 1fr; }
  .upd-strip .upd-fact:first-child { grid-column: 1 / -1; }
  .upop-bg { place-items: end center; padding: 0; }
  .upop { border-radius: 20px 20px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .upd-foot { flex-direction: column; align-items: stretch; }
  .upd-btns { justify-content: stretch; }
  .upd-btns button { flex: 1; min-height: 44px; }
}
.tag.occ { background: var(--asset-soft); color: var(--asset); border: 1px solid var(--asset-line); font-size: 11px; }
.occ-field { grid-column: 1 / -1; }
.rc-k b, .rc-v b { white-space: nowrap; }
@media (max-width: 520px) {
  .rc-row { grid-template-columns: 1fr 78px 1fr; gap: 6px 8px; }
  .rc-v b { font-size: 15px; }
}

/* פירוט סוג הוצאה בחלון צף */
tr.bd-row { cursor: pointer; }
tr.bd-row:hover td, tr.bd-row:focus-visible td { background: var(--accent-soft, rgba(108, 92, 231, .07)); }
.bd-more { font-size: 12px; color: var(--accent, #6c5ce7); opacity: 0; margin-inline-start: 6px; transition: opacity .15s; }
tr.bd-row:hover .bd-more, tr.bd-row:focus-visible .bd-more { opacity: 1; }
.bd-dlg { border: 0; border-radius: 18px; padding: 18px 20px; width: min(760px, calc(100vw - 32px)); max-height: 80vh; box-shadow: 0 24px 60px rgba(21, 18, 58, .28); }
.bd-dlg::backdrop { background: rgba(21, 18, 58, .35); }
.bd-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.bd-dlg h3 { margin: 0; font-size: 20px; }
.bd-x { border: 0; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: inherit; padding: 2px 6px; }
/* ---------- שמירת מסמך כמסמך קבע בפרופיל ---------- */
.tp-card { border-color: var(--pine); box-shadow: 0 0 0 3px var(--pine-soft), var(--shadow); }
.tp-form .chip-toggle { margin: 0 0 8px; }
.tp-form .primary { margin-top: 6px; }
.tp-more { width: 100%; margin: 6px 0; }
.tp-more summary { list-style: none; cursor: pointer; display: inline-block; }
.tp-more summary::-webkit-details-marker { display: none; }
.tp-more[open] { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--sunk); }
.tp-more[open] summary { margin-bottom: 10px; }
.flag.f-business_cert::before { content: "🪪"; }
.tp-alt { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }

/* ===== עזרה ===== */
.help-hero { background: var(--card); border: 1px solid rgba(22,20,51,.06); border-radius: 22px; padding: 26px 28px 20px; margin-bottom: 18px; box-shadow: var(--shadow);
  background-image: radial-gradient(600px 220px at 100% 0%, var(--pine-soft), transparent 70%); }
.hh-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hh-kicker { color: var(--pine); font-weight: 700; letter-spacing: .02em; }
.help-hero h1 { font-size: 30px; margin: 2px 0 6px; }
.hh-tour { display: inline-flex; align-items: center; gap: 8px; }
.hh-tour svg { width: 15px; height: 15px; color: var(--pine); }
.ask { position: relative; display: flex; gap: 8px; margin-top: 16px; }
.ask input { flex: 1; font-size: 17px; padding: 14px 46px 14px 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.ask input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 4px rgba(91,61,245,.12); }
.ask .ask-ico { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.ask button { border-radius: 14px; padding: 0 22px; font-size: 15px; }
.hh-hint { margin-top: 8px; }
.hh-pop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hh-chip { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--sunk); border: 1px solid var(--line); color: var(--ink-2); }
.hh-chip:hover { border-color: var(--pine); color: var(--pine); text-decoration: none; }
body.help-filtering .hh-pop { display: none; }

.ai-ans { margin-top: 16px; border: 1px solid #d9d1ff; background: linear-gradient(180deg, #faf8ff, #fff); border-radius: 16px; padding: 14px 18px; animation: aiIn .25s ease-out; }
@keyframes aiIn { from { opacity: 0; transform: translateY(4px); } }
.ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-badge { font-size: 11px; font-weight: 700; color: #fff; background: var(--grad); border-radius: 6px; padding: 1px 8px; }
.ai-q { font-weight: 600; color: var(--ink-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-x { border: none; background: none; font-size: 20px; line-height: 1; color: var(--muted); padding: 0 4px; }
.ai-body { font-size: 15px; line-height: 1.7; }
.ai-rel { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.ai-rel small { color: var(--muted); }
.ai-rel a { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--pine-soft); }
.ai-think { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 14px; }
.ai-think i { width: 7px; height: 7px; border-radius: 50%; background: var(--pine); opacity: .3; animation: aiDot 1s infinite; }
.ai-think i:nth-child(2) { animation-delay: .15s; } .ai-think i:nth-child(3) { animation-delay: .3s; }
.ai-think span { margin-inline-start: 6px; }
@keyframes aiDot { 50% { opacity: 1; transform: translateY(-3px); } }

.help-sections { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 6px; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--bg); }
.help-sections a { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 7px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 500; }
.help-sections a:hover { border-color: var(--pine); color: var(--pine); text-decoration: none; }
.help-sections svg { width: 16px; height: 16px; color: var(--pine); }
.help-sections i { font-style: normal; font-size: 11px; color: var(--muted); background: var(--sunk); border-radius: 999px; padding: 0 6px; }
body.help-filtering .help-sections { display: none; }
.help-group { scroll-margin-top: 60px; }
.help-group h2 { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 18px; }
.hg-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--pine-soft); color: var(--pine); }
.hg-ico svg { width: 17px; height: 17px; }
.hq { border-bottom: 1px solid var(--line); scroll-margin-top: 80px; }
.hq:last-child { border-bottom: none; }
.hq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 14px 20px; font-weight: 600; font-size: 15px; }
.hq summary::-webkit-details-marker { display: none; }
.hq summary > span:first-child { flex: 1; }
.hq summary:hover { background: var(--sunk); }
.hq .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; flex: none; }
.hq[open] .chev { transform: rotate(180deg); color: var(--pine); }
.hq[open] summary { color: var(--pine); }
.hq-body { padding: 0 20px 16px; color: var(--ink-2); line-height: 1.7; animation: aiIn .2s ease-out; }
.hq-steps { margin: 0 0 10px; padding-inline-start: 0; list-style: none; counter-reset: st; }
.hq-steps li { counter-increment: st; position: relative; padding-inline-start: 32px; margin-bottom: 6px; }
.hq-steps li::before { content: counter(st); position: absolute; inset-inline-start: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--pine-soft); color: var(--pine); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.hq-tip { background: var(--sunk); border-inline-start: 3px solid var(--pine); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.hq.flash-q { animation: qFlash 1.4s ease-out; }
@keyframes qFlash { 0%, 30% { background: var(--pine-soft); } 100% { background: transparent; } }
.help-empty { display: flex; flex-direction: column; gap: 4px; text-align: center; padding: 26px; }
@media (max-width: 860px) {
  .help-hero { padding: 20px 16px 16px; border-radius: 18px; }
  .help-hero h1 { font-size: 24px; }
  .hh-tour { width: 100%; justify-content: center; }
  .ask input { font-size: 16px; }
  .hq summary { padding: 14px 16px; }
  .hq-body { padding: 0 16px 14px; }
  .mtop-help { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-inline-start: auto; background: rgba(255,255,255,.08); }
  .mtop-help svg { width: 20px; height: 20px; }
  .mtop-help.on { background: rgba(255,255,255,.22); }
}
.mtop-help { display: none; }
@media (max-width: 860px) { .mtop .mtop-help { display: grid; } }

/* ===== סיור ראשון ===== */
.tour { position: fixed; inset: 0; z-index: 200; animation: tourIn .25s ease-out; }
.tour.out { opacity: 0; transition: opacity .2s; }
@keyframes tourIn { from { opacity: 0; } }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(21, 18, 58, .62), 0 0 0 3px rgba(255,255,255,.9), 0 0 24px 6px rgba(91,61,245,.55);
  transition: left .3s cubic-bezier(.3,.8,.3,1), top .3s cubic-bezier(.3,.8,.3,1), width .3s, height .3s; pointer-events: auto; }
.tour.centered .tour-spot { box-shadow: 0 0 0 9999px rgba(21, 18, 58, .62); }
.tour-card { position: fixed; background: #fff; border-radius: 18px; padding: 18px 20px 14px; box-shadow: 0 24px 60px -12px rgba(21,18,58,.5); outline: none;
  transition: left .3s cubic-bezier(.3,.8,.3,1), top .3s cubic-bezier(.3,.8,.3,1); }
.tour-card.in { animation: cardIn .3s cubic-bezier(.3,.8,.3,1); }
@keyframes cardIn { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.tour-card h2 { font-size: 19px; margin: 8px 0 6px; }
.tour.centered .tour-card h2 { font-size: 22px; }
.tour-b { color: var(--ink-2); font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line-2); transition: width .25s, background .25s; }
.tour-dots i.done { background: #b9adff; }
.tour-dots i.on { width: 20px; background: var(--pine); }
.tour-foot { display: flex; align-items: center; gap: 10px; }
.tour-n { flex: 1; text-align: center; white-space: nowrap; }
.tour-btns { display: flex; gap: 6px; }
.tour-skip { color: var(--muted) !important; font-size: 14px; }
@media (max-width: 860px) { .help-sections { position: static; } }
.help-empty[hidden], .help-group[hidden], .hq[hidden] { display: none; }
.help-asked .help-empty { display: none; }
.upd-fail small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); direction: ltr; text-align: left; word-break: break-word; }

/* הוצאה בהערכה ("אחר"): מסומנת באדום עד שהעובדת מחליטה */
.chk.c-recog { background: var(--red-soft, #fde8e8); color: var(--red, #c0362c); border: 1px solid rgba(192, 54, 44, .35); font-weight: 600; text-decoration: none; }
tr.needs-recog td:first-child { box-shadow: inset -3px 0 0 var(--red, #c0362c); }
.recog-check { border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.recog-check.open { background: var(--red-soft, #fde8e8); border: 1px solid rgba(192, 54, 44, .35); }
.recog-check.done { background: var(--sunk, #f4f3fa); }
.recog-check p { margin: 6px 0; }
.rq-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rq-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--red, #c0362c); color: #fff; font-weight: 700; font-size: 13px; }
.rq-dot.ok { background: var(--pine, #1f8a5b); }
.rq-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-top: 8px; }
.rq-ask { flex-basis: 100%; }
.rq-ask[open] { padding: 10px; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.rq-ask textarea { width: 100%; margin: 6px 0; }
/* מי שינה ידנית ומתי */
.who-chg { font-size: 12px; color: var(--accent, #5b4bd6); margin-top: 3px; }
.who-chg span { color: var(--muted); }
.rc-row .who-chg { grid-column: 1 / -1; }
