/* מערכת פניות · עיצוב 2 (25.11.2026, docs/SPEC.md נושא 19). הקנבס שאושר: docs/design/canvas-v9.html
   שלושה מסכים, לכל אחד שאלה: בית (מה מחכה לי) · הפניות (מה פתוח אצלי, ובאיזה שלב) · פנייה (מה קורה בה).
   ארבעה צבעים, משמעות אחת לכל צבע: שחור = התור שלך · כחול הלוגו = הודעה חדשה · ירוק הלוגו = מה שאתה כתבת · כתום = יותר מיום.
   שלושה גדלי טקסט בלבד: 15 (הכול) · 17 (נושאים) · 24 (כותרת מסך). שני משקלים: 400 ו-600.
   🔙 העיצוב הקודם (נושא 18): git show 6ffb1d0:web/style.css */
:root {
  --bg: #f3f4f6; --surface: #ffffff; --sunken: #edf0f3; --line: #e1e5ea; --line2: #c9cfd6;
  --text: #12161b; --text2: #48515b; --text3: #5d6670;
  --ink: #12161b; --ink-t: #ffffff;
  --new: #064e69; --new-bg: #cdeefa; --new-line: #40b8e0;
  --logo-b: #40b8e0; --logo-g: #b8d858; --ok-t: #1f2a05;
  --late: #b93c0a; --late-bg: #fdeee4;
  --priv-bg: #fbf3dc; --priv-line: #ead79c; --priv-t: #6b4e00;
  --mine: #e4f1bd; --mine-t: #1f2a05; --mine-t2: #566238; --theirs: #eef1f4;
  --late-row: #fef5ef;
  --wa: #0f7a55; --danger: #b91c1c; --focus: #1a73c7;
  --chat: #ffffff;
  --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(450 -40) skewX(-18)'%3E%3Crect x='0' width='34' height='880' rx='17' fill='%2340b8e0' opacity='0.06'/%3E%3Crect x='52' width='34' height='880' rx='17' fill='%23b8d858' opacity='0.09'/%3E%3Crect x='104' width='34' height='880' rx='17' fill='%23121212' opacity='0.025'/%3E%3C/g%3E%3C/svg%3E");
  --x-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6670' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  --col: #f8f9fa; --card: #ffffff;
  --avs: 70%; --avl: 88%; --avi: 22%;
  --scrim: rgba(18, 22, 27, .45); --shadow: 0 12px 32px rgba(0, 0, 0, .16);
  --s: 15px; --m: 17px; --l: 24px;
  --font: Rubik, "Segoe UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0e1113; --surface: #171b1f; --sunken: #0b0e10; --line: #262c32; --line2: #3a424a;
  --text: #eef1f4; --text2: #b8c1ca; --text3: #969fa9;
  --ink: #eef1f4; --ink-t: #0e1113;
  --new: #8fdcf5; --new-bg: #0f3a4c; --new-line: #40b8e0;
  --late: #fb9a5b; --late-bg: #3a2111;
  --priv-bg: #2d2712; --priv-line: #4c4220; --priv-t: #f1d27a;
  --mine: #2d361c; --mine-t: #e6f2bf; --mine-t2: #b2bd91; --theirs: #232a31;
  --late-row: #2c1f17;
  --wa: #4ade80; --danger: #f87171; --focus: #7cc4ff;
  --chat: #0e1113;
  --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(450 -40) skewX(-18)'%3E%3Crect x='0' width='34' height='880' rx='17' fill='%2340b8e0' opacity='0.06'/%3E%3Crect x='52' width='34' height='880' rx='17' fill='%23b8d858' opacity='0.05'/%3E%3Crect x='104' width='34' height='880' rx='17' fill='%23eef1f4' opacity='0.03'/%3E%3C/g%3E%3C/svg%3E");
  --x-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23969fa9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  --col: #111417; --card: #1c2126;
  --avs: 35%; --avl: 26%; --avi: 84%;
  --scrim: rgba(0, 0, 0, .6); --shadow: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #0e1113; --surface: #171b1f; --sunken: #0b0e10; --line: #262c32; --line2: #3a424a;
  --text: #eef1f4; --text2: #b8c1ca; --text3: #969fa9;
  --ink: #eef1f4; --ink-t: #0e1113;
  --new: #8fdcf5; --new-bg: #0f3a4c; --new-line: #40b8e0;
  --late: #fb9a5b; --late-bg: #3a2111;
  --priv-bg: #2d2712; --priv-line: #4c4220; --priv-t: #f1d27a;
  --mine: #2d361c; --mine-t: #e6f2bf; --mine-t2: #b2bd91; --theirs: #232a31;
  --late-row: #2c1f17;
  --wa: #4ade80; --danger: #f87171; --focus: #7cc4ff;
  --chat: #0e1113;
  --pat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 800' preserveAspectRatio='xMidYMid meet'%3E%3Cg transform='translate(450 -40) skewX(-18)'%3E%3Crect x='0' width='34' height='880' rx='17' fill='%2340b8e0' opacity='0.06'/%3E%3Crect x='52' width='34' height='880' rx='17' fill='%23b8d858' opacity='0.05'/%3E%3Crect x='104' width='34' height='880' rx='17' fill='%23eef1f4' opacity='0.03'/%3E%3C/g%3E%3C/svg%3E");
  --x-ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23969fa9' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
  --col: #111417; --card: #1c2126;
  --avs: 35%; --avl: 26%; --avi: 84%;
  --scrim: rgba(0, 0, 0, .6); --shadow: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 var(--s)/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: var(--l); line-height: 1.25; text-wrap: balance; }
h2 { font-size: var(--m); line-height: 1.35; }
h3 { font-size: var(--s); }
p { margin: 0; text-wrap: pretty; }
b, strong { font-weight: 600; }
small, em { font-size: var(--s); font-style: normal; }
button { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex-shrink: 0; }
.t2 { color: var(--text2); } .t3 { color: var(--text3); } .muted { color: var(--text3); }
.num { font-variant-numeric: tabular-nums; }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.hide { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* מיקוד = מסגרת כהה בלבד. התכלת שמור ל"הודעה חדשה" (26.11.2026) */
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ── כפתורים ושדות ── */
.btn { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line2); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--sunken); }
.btn.pri { background: var(--ink); border-color: var(--ink); color: var(--ink-t); }
.btn.pri:hover { background: var(--ink); opacity: .9; }
/* משני אחד בכל המערכת: לבן עם מסגרת (כמו .btn). "ביטול" ו"לא עכשיו" באותה גרסה. */
.btn.ghost { font-weight: 400; }
.btn.lg { height: 52px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: default; }
/* ראשי מושבת: משטח אפור בהיר עם טקסט אפור, לא "גוש אפור" שנראה כמו כפתור בצבע אחר */
.btn.pri:disabled { opacity: 1; background: var(--sunken); border-color: var(--line); color: var(--text3); }
/* "סימון כטופלה": לבן עם מסגרת, ווי בירוק הלוגו (עיקרון 7) */
.btn.done { background: var(--surface); border: 1.5px solid var(--text); color: var(--text); }
.btn.done .ok { width: 22px; height: 22px; border-radius: 50%; background: var(--logo-g); color: var(--ok-t); display: grid; place-items: center; }
.btn.done .ok .ic { width: 14px; height: 14px; }
.ibtn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 10px; border: 0; background: transparent; color: var(--text2); cursor: pointer; padding: 0; flex-shrink: 0; }
.ibtn:hover { background: var(--sunken); color: var(--text); }
.ibtn.pri { background: var(--ink); color: var(--ink-t); }
.lnk { min-width: 44px; justify-content: center; color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.lnk.quiet { color: var(--text3); }
input, select, textarea { font: inherit; font-size: var(--s); color: var(--text); width: 100%; min-height: 48px; padding: 12px 16px;
  border-radius: 10px; border: 1px solid var(--line2); background: var(--surface); }
textarea { resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text3); }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; width: 16px; height: 16px; background: var(--x-ic) center / 16px no-repeat; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; accent-color: var(--ink); box-shadow: none; }
input[dir=ltr] { text-align: right; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-weight: 600; }
.field > span em { font-weight: 400; color: var(--text3); }
.field small { color: var(--text3); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.chk { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }

/* ── אווטר: צבע קבוע לכל אדם ── */
/* גודל אחד ליד טקסט: 28. גדול (40) רק בראש עמודת הצד ובמגירה. שתי אותיות תמיד. */
.av { width: 28px; height: 28px; border-radius: 50%; background: hsl(var(--h, 210) var(--avs) var(--avl)); color: hsl(var(--h, 210) 60% var(--avi));
  display: inline-grid; place-items: center; font-weight: 600; flex-shrink: 0; letter-spacing: -.02em; line-height: 1; }
.av.sm { width: 28px; height: 28px; }
.av.lg { width: 40px; height: 40px; }

/* ── הסימן: מי מחכה למי (עיגול מלא שחור = שלך · ריק = של מישהו אחר · כתום = יותר מיום) ── */
/* המצב: נקודה + מילים, רגוע (400). הנקודה נושאת את הצבע. ב"יותר מיום" רק המילים האלה בכתום (26.11.2026). */
.who { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; white-space: nowrap; color: var(--text2); }
.who::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--text3); flex-shrink: 0; }
.who.me { color: var(--text); }
.who.me::before { background: var(--ink); border-color: var(--ink); }
.who.late::before { background: var(--late); border-color: var(--late); }
.who .late-t { color: var(--late); font-weight: 600; white-space: nowrap; }
.who.done::before { background: var(--line2); border-color: var(--line2); }
/* מה חדש: אותה שפה, נקודה + מילים, בלי גוש צבע. פנייה חדשה = שחור · הודעה חדשה = כחול הלוגו · יותר מיום = כתום. */
.mark { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; color: var(--text); }
.mark::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }
.mark.msg { color: var(--new); }
.mark.msg::before { background: var(--new-line); }
.mark.late { color: var(--late); }
.mark.late::before { background: var(--late); }
.cnt { min-width: 24px; height: 24px; border-radius: 12px; background: var(--ink); color: var(--ink-t); display: inline-grid; place-items: center; font-weight: 600; padding: 0 8px; line-height: 1; font-variant-numeric: tabular-nums; }
/* שלב בכותרת עמודה (Attio): סימן אפור ○ נרשמה · ◐ בטיפול · ● טופלה, שם, ומונה עדין. בלי צבע חדש. */
.stp { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.stp::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--text3); box-sizing: border-box; flex-shrink: 0; }
.stp.in_progress::before { border-color: var(--text2); background: linear-gradient(90deg, var(--text2) 50%, transparent 50%); }
.stp.done::before { border-color: var(--text2); background: var(--text2); }
.bcnt { min-width: 24px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--sunken); color: var(--text2); display: inline-grid; place-items: center; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
/* תגים */
.tg { display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--text2); white-space: nowrap; }
.tg::before { content: "#"; color: var(--text3); }
.tgs { display: flex; flex-wrap: wrap; gap: 8px; }
/* בעמודת הצד התגים לחיצים, ולכן בגובה 44 */
.tgs.edit .tg { min-height: 44px; padding-inline-start: 15px; padding-inline-end: 3px; }
.tg .tg-x { width: 44px; height: 44px; margin-block: -2px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: var(--text3); cursor: pointer; padding: 0; }
.tg .tg-x:hover { background: var(--sunken); color: var(--text); }
.tg .tg-x .ic { width: 15px; height: 15px; }
.tg-add { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 15px; border-radius: 999px; border: 1px dashed var(--line2); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; }
.tg-add .ic { width: 15px; height: 15px; }
.tg-form { position: relative; flex: 1 1 100%; }
.tg-form input { min-height: 44px; border-radius: 10px; }
.tg-sug { position: absolute; z-index: 25; top: calc(100% + 4px); inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 7px; display: grid; max-height: 260px; overflow-y: auto; }
.tg-sug button { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 0; border-radius: 10px; background: none; text-align: start; cursor: pointer; }
.tg-sug button[aria-selected="true"], .tg-sug button:hover { background: var(--sunken); }
.tg-sug button .t3 { margin-inline-start: auto; }
.tg-sug .tg-new { color: var(--text2); }

/* ── הלוגו ── */
.logo { height: 32px; width: auto; display: block; }
.logo.dk { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo.lt { display: none; } :root:not([data-theme="light"]) .logo.dk { display: block; } }
:root[data-theme="dark"] .logo.lt { display: none; }
:root[data-theme="dark"] .logo.dk { display: block; }

/* ── סרגל עליון (מטפל ועובד) ── */
.tb { position: sticky; top: 0; z-index: 20; height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; padding: 0 20px; }
.tb-brand { display: flex; align-items: center; gap: 8px; margin-inline-end: 14px; min-height: 44px; }
.tb-brand span { font-size: var(--m); font-weight: 600; }
.tb-title { display: none; }
.tb-tab { height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 10px; color: var(--text2); }
.tb-tab:hover { background: var(--sunken); color: var(--text); }
.tb-tab.on { background: var(--sunken); color: var(--text); font-weight: 600; }
.tb-sp { margin-inline-start: auto; display: flex; align-items: center; gap: 12px; }
.tb-search { position: relative; width: 300px; }
.tb-search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.tb-search input { min-height: 44px; height: 44px; border: 1px solid transparent; background: var(--sunken); padding-inline-start: 40px; }
.tb-arch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; color: var(--text3); border-radius: 10px; }
.tb-arch:hover { color: var(--text); background: var(--sunken); }
.tb-arch.on { color: var(--text); background: var(--sunken); font-weight: 600; }
.tb-me { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; position: relative; }
.tb-icon { display: none; }
.tb-menu { position: absolute; top: 56px; inset-inline-end: 12px; z-index: 30; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 7px; display: grid; }
.tb-menu .mh { padding: 8px 12px; color: var(--text3); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.tb-menu a, .tb-menu button { min-height: 44px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-radius: 10px; border: 0; background: none; text-align: start; cursor: pointer; color: var(--text); }
.tb-menu a:hover, .tb-menu button:hover { background: var(--sunken); }
.userbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 7px 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }

/* סרגל תחתון בטלפון: בית · הפניות */
.ptabs { display: none; }

/* ── מסך: רוחב וכותרת ── */
.scr { max-width: 1240px; margin: 0 auto; padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 16px; }
.scr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.scr-head h1 { margin-inline-end: 6px; }
.scr-head .grow { flex: 1; }
.sec-h { display: flex; align-items: center; gap: 12px; }
.hint { color: var(--text2); display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.empty-state { text-align: center; padding: 40px 24px; color: var(--text2); display: grid; justify-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.empty-state .ic { width: 32px; height: 32px; color: var(--text3); }
.empty-state b { color: var(--text); font-size: var(--m); }

/* ── שורות (בית, רשימה, ארכיון, חיפוש) ── */
.hl { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) 180px 140px 240px; gap: 16px; align-items: start; min-height: 72px; padding: 12px 20px; border-top: 1px solid var(--line); color: inherit; }
/* כל הערכים על קו הנושא */
.hrow-p { margin-block: -2px; }
.hrow-at, .hrow-nw { line-height: 23px; }
.hl > .hrow:first-child { border-top: 0; }
a.hrow:hover { background: color-mix(in srgb, var(--sunken) 60%, transparent); }
.hrow.hd { min-height: 44px; background: var(--sunken); color: var(--text3); }
.hrow-s { display: grid; min-width: 0; }
.hrow-s b { font-size: var(--m); }
.hrow-p { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hrow-at { color: var(--text2); }
.hrow-nw { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; min-width: 0; }
.hrow-nw .who { white-space: normal; }
.hrow .tgs { margin-top: 4px; }
.hrow-pm { display: none; }
/* קבוצה (monday, יובל סימן): פס לאורך הקבוצה בצבע המשמעות שלה. "מחכה לתשובה שלך" = שחור. */
.hl.grp.me { border-inline-start: 4px solid var(--ink); }

/* ── הפניות: עמודות לפי סטטוס ── */
/* סינון: רכיב בחירה אחד (כפתור התג ורשימת הסוג נראים אותו דבר): 44, פינה 10, טקסט כהה, חץ 16 במרחק 12, רוחב קבוע. */
.flts { display: flex; gap: 12px; flex-wrap: wrap; }
.flt { width: 220px; height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 11px 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text2); cursor: pointer; font: inherit; position: relative; }
.flt { color: var(--text); }
.flt .ell { flex: 1; text-align: start; }
.flt > .ic:last-child { width: 16px; height: 16px; color: var(--text3); }
.flt.on { border-color: var(--text); }
.sel { position: relative; display: inline-flex; }
.sel select { appearance: none; -webkit-appearance: none; width: 220px; height: 44px; min-height: 44px; padding: 0 15px; padding-inline-end: 39px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); cursor: pointer; }
.sel > .ic { position: absolute; inset-inline-end: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text3); pointer-events: none; }
.sel.on select { border-color: var(--text); }
/* "נבחר" אחד בכל המערכת: משטח לבן, מסגרת כהה של 1 ו-600. השחור שמור לפעולה. */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--sunken); max-width: 100%; }
.seg > a, .seg > button { height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; color: var(--text2); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.seg > .on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--text); border-radius: 10px; }
.seg .count { color: var(--text3); }
.flt-wrap { position: relative; }
.tagdd { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 25; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 3px 11px 11px; display: grid; gap: 4px; }
.tagdd .grab, .dd-scrim { display: none; }
.dd-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dd-h .ibtn { margin-inline-end: -8px; }
.tagdd label { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.bcols { display: grid; grid-template-columns: 1fr 1fr .75fr; gap: 16px; align-items: start; }
.bcol { background: var(--col); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bcol > h2 { padding: 4px; display: flex; align-items: center; gap: 8px; }
.bcol .none { color: var(--text2); padding: 8px 4px; }
.bcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 15px; display: grid; gap: 8px; color: inherit; min-width: 0; }
.bcard:hover { border-color: var(--line2); }
.bcard-r { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.bcard-r .who { white-space: normal; }
.bcard-s { font-size: var(--m); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.bcard-p { display: flex; }
.bcard-p, .hrow-pm { align-items: center; gap: 8px; color: var(--text2); min-width: 0; }
.bcard-p .t3, .hrow-pm .t3 { margin-inline-start: auto; white-space: nowrap; }
.bcard.done { padding: 7px 15px; }
.bcard.done .bcard-s { font-size: var(--s); }
.bcol .arch2 { justify-content: center; }
.stg { display: none; }

/* ── פנייה: שיחה במרכז, עמודת צד ── */
.rq { display: grid; grid-template-columns: minmax(0, 1fr) 360px; height: calc(100vh - 64px); height: calc(100dvh - 64px); background: var(--surface); }
/* שלוש עמודות במסך רחב (Intercom): הפתוחות שלי · השיחה · הפרטים. במסך צר העמודה הראשונה יורדת. */
.rq.has-list { grid-template-columns: 300px minmax(0, 1fr) 340px; }
@media (max-width: 1359px) { .rq.has-list { grid-template-columns: minmax(0, 1fr) 340px; } .rq .ql { display: none; } }
.rq.solo { grid-template-columns: minmax(0, 1fr); max-width: 760px; margin: 0 auto; border-inline: 1px solid var(--line); }
.rq-chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--pat) center / auto 100% no-repeat, var(--chat); }
.rq-chat.priv { background: var(--bg); }
.rq-head { background: var(--surface); border-bottom: 1px solid var(--line); min-height: 76px; display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.rq-back .ic { width: 22px; height: 22px; }
.rq-t { display: grid; min-width: 0; flex: 1; }
.rq-t h1 { font-size: var(--m); line-height: 1.35; overflow-wrap: anywhere; }
/* כותרת פנייה במבנה אחד: נושא + שורה אחת (מצב · מספר · פונה · סוג), תמיד באותו גובה */
.rq-sub { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; min-width: 0; }
.rq-sub > .t2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rq-act { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rq-vr { width: 1px; height: 28px; background: var(--line); margin-inline: 8px; }
.rq-bar { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; }
/* פקד פעיל = לבן עם מסגרת. מילוי אפור שמור למושבת. */
.rq-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line2); cursor: pointer; text-align: start; color: var(--text); }
.rq-info .ic { margin-inline-start: auto; color: var(--text3); }
.rq-track { background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 20px 16px; display: grid; gap: 12px; }
.rq-tr { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rq-tr p { flex: 1 1 240px; }
.rq-conv { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rq-log { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 48px; display: flex; flex-direction: column; gap: 8px; }
.rq-log .none { align-self: center; color: var(--text2); padding: 12px 0; }
.sysl { align-self: center; color: var(--text2); display: flex; gap: 8px; align-items: center; text-align: center; margin: 4px 0; max-width: 92%; }
.sysl .ic { width: 16px; height: 16px; }
.sysl.day { color: var(--text3); }
/* בועות: של אחרים באפור, שלך בירוק הלוגו, הודעה חדשה ברקע ובמסגרת כחולים */
.mb { position: relative; max-width: min(66%, 620px); background: var(--theirs); border: 2px solid transparent; border-radius: 14px; padding: 8px 12px; display: grid; gap: 4px; align-self: flex-start; overflow-wrap: anywhere; }
.mb.mine { align-self: flex-end; background: var(--mine); color: var(--mine-t); }
.mb.mine .mb-tm { color: var(--mine-t2); }
.mb.unseen { background: var(--new-bg); }
.mb.note { background: var(--priv-bg); border-color: var(--priv-line); }
.mb.cont { margin-top: -4px; }
.mb-n { font-weight: 600; color: var(--text2); display: flex; flex-wrap: wrap; gap: 0 8px; }
.mb.mine .mb-n { color: inherit; }
.mb-nw { color: var(--new); }
.mb-note { color: var(--priv-t); display: inline-flex; align-items: center; gap: 4px; font-weight: 400; }
.mb-note .ic { width: 15px; height: 15px; }
.mb-fw { color: var(--text3); }
.mb-txt { white-space: pre-wrap; }
.mb-tm { color: var(--text3); justify-self: end; display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.mb-tm .ic { width: 15px; height: 15px; color: var(--text3); }
.mb .more { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: -52px; opacity: 0; }
.mb.mine .more { inset-inline-end: auto; inset-inline-start: -52px; }
.mb:hover .more, .mb .more:focus-visible, .mb .more[aria-expanded=true] { opacity: 1; }
/* בטלפון החץ לא קבוע ליד כל בועה. לחיצה על הבועה מציגה אותו. */
@media (hover: none) { .mb .more { opacity: 0; pointer-events: none; } .mb.show-more .more { opacity: 1; pointer-events: auto; } }
.menu { position: absolute; z-index: 30; top: 44px; inset-inline-end: -48px; min-width: 230px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 7px; display: flex; flex-direction: column; }
.mb.mine .menu { inset-inline-end: auto; inset-inline-start: -48px; }
.menu button { text-align: start; border: 0; background: none; padding: 0 12px; border-radius: 10px; cursor: pointer; min-height: 44px; }
.menu button:hover, .menu button:focus-visible { background: var(--sunken); }
.menu .mh { color: var(--text3); padding: 8px 12px 4px; }
.rq-req { align-self: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: grid; gap: 8px; margin-bottom: 8px; }
.rq-req .rq-mh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--text2); }
.rq-req .rq-mh b { color: var(--text); }
.rq-req .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs a.thumb { display: block; position: relative; border-radius: 10px; cursor: zoom-in; color: var(--text2); }
.thumbs img { width: 112px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.mb .thumbs img { width: 180px; height: 120px; }
/* תמונה שלא נטענה: אריח עם אייקון ושם הקובץ */
.thumb-n { display: none; }
.thumb.broken img { display: none; }
.thumb.broken .thumb-n { display: flex; align-items: center; gap: 8px; max-width: 240px; height: 80px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: var(--sunken); }
/* שיחות: כולם, ופרטית עם כל מטפל */
/* בורר הנמענים = אותו מתג מקטעים כמו כל בורר (.seg) */
.rq-threads { overflow-x: auto; align-self: start; }
.rq-threads .ic { width: 16px; height: 16px; }
.rq-threads .nn { min-width: 22px; height: 22px; border-radius: 11px; background: var(--new-bg); color: var(--new); display: inline-grid; place-items: center; font-weight: 600; padding: 0 8px; line-height: 1; }
/* תיבת התשובה ככרטיס (Intercom): טקסט למעלה, ושורת כלים: צירוף · לאן ההודעה תגיע · שליחה */
.rq-comp { background: var(--surface); padding: 12px 20px 16px; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.rq-chat.priv .rq-comp { background: var(--bg); }
.rq-box { border: 1px solid var(--line2); border-radius: 14px; background: var(--surface); display: grid; }
.rq-box:focus-within { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.rq-chat.priv .rq-box { border-style: dashed; border-color: var(--text3); }
.rq-box textarea { border: 0; background: transparent; min-height: 48px; max-height: 200px; resize: none; padding: 12px 16px 4px; }
.rq-box textarea:focus { box-shadow: none; }
.rq-tools { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px; }
.rq-send .ic { width: 18px; height: 18px; }
.rq-hint { flex: 1; min-width: 0; color: var(--text3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.rq-hint .ic { width: 15px; height: 15px; }
.rq-hint .fname { color: var(--text); font-weight: 600; }
.rq-foot { display: flex; justify-content: center; }
/* שיחה פרטית: שורה קבועה בראש השיחה */
.priv-h { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 11px; border-radius: 10px; border: 1px dashed var(--line2); background: var(--surface); color: var(--text2); text-align: center; }
.priv-h .ic { width: 16px; height: 16px; }
/* עמודת הצד */
.rq-side { background: var(--surface); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.rq-grab { display: none; }
.rq-blk { padding: 16px 20px; display: grid; gap: 8px; border-bottom: 1px solid var(--line); }
.rq-blk:last-child { border-bottom: 0; }
.rq-h { font-size: var(--s); font-weight: 400; color: var(--text3); }
.rq-from { display: flex; gap: 12px; align-items: center; }
.rq-from > div { display: grid; min-width: 0; }
.rq-from a { color: var(--text2); min-height: 44px; display: inline-flex; align-items: center; justify-self: start; }
.kv { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px 16px; margin: 0; }
.kv dt { color: var(--text3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv a { text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; gap: 4px; }
.kv a .ic { width: 15px; height: 15px; }
.ppl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.ppl > span { display: inline-flex; align-items: center; gap: 8px; }
.ppl-act { display: flex; gap: 8px; flex-wrap: wrap; }
/* מסלול הפנייה */
.tl { list-style: none; margin: 0; padding: 0; display: grid; position: relative; }
.tl::before { content: ""; position: absolute; top: 12px; bottom: 16px; inset-inline-start: 7px; width: 2px; background: var(--line); }
.tl li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 4px 0; position: relative; }
.tl li > div { display: grid; line-height: 1.35; min-width: 0; }
.tl .pt { width: 10px; height: 10px; border-radius: 50%; background: var(--line2); justify-self: center; margin-top: 6px; z-index: 1; }
.tl .big .pt { width: 16px; height: 16px; margin-top: 3px; background: var(--surface); border: 2px solid var(--text3); }
.tl .big.done .pt { background: var(--text); border-color: var(--text); }
.tl .big.todo b { color: var(--text3); font-weight: 400; }
.tl .tl-at { color: var(--text3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rq-scrim { display: none; }
/* עמודת "הפתוחות שלי" ליד הפנייה */
.ql { background: var(--surface); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ql-h { display: flex; align-items: center; gap: 8px; padding: 16px 20px 8px; font-size: var(--m); }
.ql-list { overflow-y: auto; min-height: 0; padding: 0 8px 12px; display: grid; gap: 4px; align-content: start; }
.ql-i { display: grid; gap: 4px; padding: 12px; border-radius: 10px; color: inherit; min-width: 0; }
.ql-i:hover { background: var(--sunken); }
.ql-i.on { background: var(--sunken); box-shadow: inset 0 0 0 1px var(--line2); }
.ql-s { font-size: var(--m); font-weight: 600; }
.ql-m { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.ql-m .who { white-space: normal; }
.ql-none { padding: 12px; }

/* ── העובד: הפניות שלי ── */
.page { max-width: 760px; margin: 0 auto; padding: 24px 16px 120px; display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .t { flex: 1; min-width: 200px; display: grid; gap: 4px; }
.ecard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 15px; display: grid; gap: 8px; color: inherit; }
.ecard:hover { border-color: var(--line2); }
.ecard.fresh { border-color: var(--new-line); }
.ecard-s { font-size: var(--m); font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.ecard .mark { justify-self: start; }
.steps3 { display: grid; grid-template-columns: auto 1fr auto 1fr auto; gap: 8px; align-items: center; color: var(--text3); max-width: 360px; }
.steps3 i { height: 3px; border-radius: 2px; background: var(--line2); }
.steps3 i.on { background: var(--text); }
.steps3 .on { color: var(--text); font-weight: 600; }
/* "טופלו" = קישור אפור (ישן ונסגר = נסתר אבל נגיש). בפתיחה הכרטיסים רגילים, בלי מיכל. */
.efold { background: none; border: 0; }
.efold > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; color: var(--text2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.efold > summary::-webkit-details-marker { display: none; }
.efold > summary .ic:last-child { transition: transform .15s; }
.efold[open] > summary .ic:last-child { transform: rotate(180deg); }
.efold .efold-body { padding: 8px 0 0; display: grid; gap: 12px; }
.efoot { display: grid; gap: 8px; justify-items: center; text-align: center; }
.efoot-l { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; }
.center-card { width: calc(100% - 32px); max-width: 420px; margin: 8vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.center-card p { color: var(--text2); }
.known { display: flex; align-items: center; gap: 8px; color: var(--wa); }
.known .ic { width: 15px; height: 15px; }

/* ── טופס פנייה חדשה: שלב אחרי שלב, "המשך" פעיל רק כשהשלב מלא ── */
.rform { max-width: 640px; margin: 0 auto; width: 100%; padding: 24px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.rform-head { display: flex; align-items: center; gap: 8px; }
.rform-head .ibtn { margin-inline-start: -12px; }
.rform-sub { color: var(--text2); }
.idcard { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.idcard > div { display: grid; }
.fsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fst { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.fst-no { width: 28px; height: 28px; border-radius: 50%; background: var(--sunken); color: var(--text2); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; margin-top: 2px; }
.fst.cur .fst-no { background: var(--ink); color: var(--ink-t); }
.fst-no .ic { width: 16px; height: 16px; }
.fst.cur { border-color: var(--ink); }
.fst-main { flex: 1; min-width: 0; display: grid; gap: 12px; }
.fst-main > b { line-height: 32px; }
.fst.todo .fst-main > b { color: var(--text3); font-weight: 400; }
.fst-sum { color: var(--text2); margin-top: -8px; overflow-wrap: anywhere; }
.fst .fst-edit { margin-inline-start: auto; min-height: 44px; margin-block: -6px; }
.fst-body { display: grid; gap: 12px; }
.fst:not(.cur) .fst-body { display: none; }
.fst-opt { color: var(--text3); font-weight: 400; }
.opts { display: grid; gap: 8px; }
.opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; background: var(--surface); }
.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt .rd { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--text3); flex-shrink: 0; }
.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt:has(input:checked) .rd { border: 6px solid var(--ink); }
.opt:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.opt .t3 { margin-inline-start: auto; }
.opt > span:not(.rd):not(.av) { display: grid; }
.drop { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; border-radius: 10px; border: 1px dashed var(--line2); color: var(--text2); cursor: pointer; padding: 8px 12px; text-align: center; }
.drop:hover { border-color: var(--text); color: var(--text); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ffoot { display: flex; gap: 12px; align-items: center; margin-top: 4px; }
.ffoot .btn.pri { flex: 1; }

/* ── חלון, שכבה מלמטה, תמונה בגדול, הודעה קופצת ── */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); display: flex; align-items: flex-start; justify-content: center; padding: 96px 16px 16px; overflow-y: auto; }
.dialog { width: 100%; max-width: 480px; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.dialog > header { display: flex; align-items: center; gap: 12px; padding: 16px 12px 4px 24px; padding-inline-start: 24px; padding-inline-end: 12px; }
.dialog > header h2 { flex: 1; }
.dialog .dbody { padding: 8px 24px 20px; display: flex; flex-direction: column; gap: 16px; }
.dialog > footer { display: flex; gap: 8px; padding: 0 24px 24px; }
.dialog > footer .pri { flex: 1; }
.dialog textarea { resize: none; }
.pick { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0; padding: 0; }
.pick label { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pick label:last-child { border-bottom: 0; }
.pick label:has(input:checked) { background: var(--sunken); }
.pick .who-n { flex: 1; font-weight: 600; }
.pick .none { padding: 16px; color: var(--text2); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 12, .88); display: flex; align-items: center; justify-content: center; padding: max(56px, env(safe-area-inset-top, 0px)) 64px 56px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.lb-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .28); }
.lb-btn:focus-visible { outline: 3px solid #fff; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-x { top: max(12px, env(safe-area-inset-top, 0px)); inset-inline-end: 12px; }
.lb-prev { top: 50%; transform: translateY(-50%); inset-inline-start: 12px; }
.lb-next { top: 50%; transform: translateY(-50%); inset-inline-end: 12px; }
.lb-next svg { transform: scaleX(-1); }
.lb-n { position: absolute; bottom: 18px; inset-inline: 0; text-align: center; color: rgba(255, 255, 255, .85); }
#toast { position: fixed; bottom: 24px; inset-inline: 16px; margin: auto; max-width: 380px; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--ink-t);
  text-align: center; opacity: 0; font-weight: 600; transform: translateY(12px); transition: .18s; pointer-events: none; z-index: 70; box-shadow: var(--shadow); }
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: var(--danger); }
.banner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 20px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--text2); }
.banner .t { flex: 1 1 220px; min-width: 0; }
.banner b { color: var(--text); }

/* ── הגדרות וכניסה ── */
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.toolbar .grow { flex: 1; }
.toolbar .sub { color: var(--text2); }
.content { display: flex; flex-direction: column; gap: 16px; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.search { position: relative; display: block; }
.search .ic { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.search input { padding-inline-start: 40px; min-height: 44px; }
.tbl-wrap { border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; table-layout: fixed; }
.tbl th { text-align: start; font-weight: 400; color: var(--text3); padding: 0 16px; height: 44px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sunken); }
.tbl td { padding: 8px 16px; height: 56px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text2); vertical-align: middle; }
.tbl tbody tr[data-p] { cursor: pointer; }
.tbl tbody tr[data-p]:hover td { background: var(--sunken); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .end { text-align: end; font-variant-numeric: tabular-nums; }
.tbl-p { display: inline-flex; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.tbl.types td { vertical-align: top; }
.ty-note { display: block; margin-top: 4px; }
.tbl tr.cur td { background: var(--sunken); }
.tbl td input, .tbl td select { min-height: 44px; }
.split { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.split .listcol { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
/* מגירה קבועה בצד המסך, בגובה המסך: לא דוחסת את הטבלה, ו"שמירה" תמיד גלויה למטה */
.drawer { position: fixed; top: 64px; bottom: 0; inset-inline-end: 0; z-index: 30; width: 400px; max-width: 100vw; border: 0; border-inline-start: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.drawer .dbody { overflow-y: auto; min-height: 0; }
.drawer > header { display: flex; align-items: center; gap: 12px; padding: 16px 12px 15px 20px; padding-inline-start: 20px; padding-inline-end: 12px; border-bottom: 1px solid var(--line); }
.drawer > header .t { flex: 1; min-width: 0; display: grid; }
.drawer > header b { font-size: var(--m); }
.drawer > header span { color: var(--text2); }
.drawer .dbody { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.drawer h3 { color: var(--text3); font-weight: 400; padding-top: 16px; border-top: 1px solid var(--line); }
.drawer > footer { display: flex; gap: 8px; padding: 15px 20px 20px; border-top: 1px solid var(--line); }
.drawer > footer .pri { flex: 1; }
.seg.full { display: flex; }
.seg.full > button { flex: 1; justify-content: center; }
.login-card { max-width: 380px; margin-top: 24px; }
.login-logo { display: flex; justify-content: center; margin-top: 12vh; }
.login-logo .logo { height: 40px; }
body.logged-out .tb, body.logged-out .ptabs { display: none !important; }

/* ── טלפון ── */
@media (max-width: 860px) {
  .tb { gap: 4px; height: 60px; padding: 0 16px; }
  body.on-form .tb-new { display: none; }
  .tb-brand span, .tb-tab, .tb-search, .tb-arch span, .tb-new-t { display: none; }
  .tb-brand { margin-inline-end: 4px; }
  .tb-title { display: block; font-size: var(--l); font-weight: 600; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tb-sp { gap: 4px; }
  .tb-icon { display: inline-grid; }
  .tb .btn.pri.tb-new { width: 44px; padding: 0; }
  .tb-arch { width: 44px; justify-content: center; padding: 0; }
  .ptabs { display: grid; position: fixed; inset-inline: 0; bottom: 0; z-index: 20; grid-template-columns: 1fr 1fr; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 8px max(8px, env(safe-area-inset-bottom, 0px)); }
  .ptabs > a { min-height: 56px; display: grid; justify-items: center; align-content: center; gap: 4px; color: var(--text2); position: relative; }
  .ptabs > a.on { color: var(--text); font-weight: 600; }
  .ptabs .cnt { position: absolute; top: 4px; inset-inline-end: calc(50% - 34px); }
  body.has-ptabs { padding-bottom: 76px; }
  body.on-req .tb, body.on-req .ptabs, body.on-form .ptabs { display: none; }
  body.on-req { padding-bottom: 0; }
  .scr { padding: 12px 12px 24px; gap: 12px; }
  .scr-head > h1 { display: none; }
  .hl { background: none; border: 0; border-radius: 0; display: grid; gap: 12px; overflow: visible; }
  .hrow.hd { display: none; }
  .hrow { grid-template-columns: minmax(0, 1fr); gap: 4px; min-height: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .hl > .hrow:first-child { border-top: 1px solid var(--line); }
  .hrow-nw { order: 1; }
  .hrow-nw:empty { display: none; }
  .hrow-s > b { white-space: normal; }
  /* כרטיס אחד בכל מקום: נושא, הודעה, מצב, פונה, תגים */
  .hrow-s { display: contents; }
  .hrow-s > .tgs { order: 3; margin-top: 4px; }
  .hl.grp.me { border-inline-start: 0; }
  .res-h { font-size: var(--s); font-weight: 400; color: var(--text2); }
  .hrow-p, .hrow-at { display: none; }
  .hrow-pm { display: flex; order: 2; }
  .ph-hide { display: none !important; }
  .flts { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .flt, .sel, .sel select { width: 100%; }
  .bcols { grid-template-columns: minmax(0, 1fr); }
  .bcol { background: none; border: 0; padding: 0; }
  .bcol > h2 { display: none; }
  .bcols[data-st] .bcol { display: none; }
  .bcols[data-st="new"] .bcol[data-st="new"], .bcols[data-st="in_progress"] .bcol[data-st="in_progress"], .bcols[data-st="done"] .bcol[data-st="done"] { display: flex; }
  .stg { display: flex; width: 100%; }
  .stg > button { flex: 1; padding: 0 8px; }
  .scr-head .seg.views { display: none; }
  /* סינון התגים בטלפון: אותה שכבה מלמטה כמו "פרטי הפנייה": ידית, החשכה, כותרת וסגירה */
  .tagdd { position: fixed; top: auto; bottom: 0; inset-inline: 0; z-index: 41; width: auto; border: 0; border-radius: 20px 20px 0 0; padding: 0 16px max(20px, env(safe-area-inset-bottom, 0px)); box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); }
  .tagdd .grab { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line2); margin: 12px auto 4px; }
  .flt-wrap.open .dd-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
  /* פנייה בטלפון: כותרת קצרה, השיחה בכל המסך, ופרטים בשכבה מלמטה */
  .rq { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
  .rq.solo { border: 0; }
  .rq-chat { flex: 1; min-height: 0; }
  .rq-head { min-height: 0; padding: 8px; gap: 4px; }
  .rq-info-wrap { background: var(--surface); border-bottom: 1px solid var(--line); }
  .rq-log { padding: 12px; }
  .mb { max-width: 84%; }
  .mb .more { inset-inline-end: -48px; }
  .mb.mine .more { inset-inline-start: -48px; }
  .rq-comp { padding: 7px 12px max(12px, env(safe-area-inset-bottom, 0px)); }
  input, select, textarea { font-size: var(--m); }
  .rq-sendt { display: none; }
  .rq-send { width: 44px; padding: 0; }
  .rq-track { padding: 8px 16px; }
  .rq-track .steps3 { display: none; }
  #chead { display: none; }
  .rq-tools:has(.thr-sel) .rq-hint { display: none; }
  .thr-sel select { width: auto; max-width: 200px; }
  .fst-body { margin-inline-start: -40px; }
  .sheet-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 4px 8px; }
  .rq-side { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; max-height: 86vh; max-height: 86dvh; border-radius: 20px 20px 0 0; border: 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); transform: translateY(105%); transition: transform .2s; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .rq.side-open .rq-side { transform: none; }
  .rq.side-open .rq-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
  .rq-grab { display: grid; place-items: center; width: 100%; min-height: 44px; border: 0; padding: 0; background: none; cursor: pointer; position: sticky; top: 0; background: var(--surface); z-index: 2; }
  .rq-grab span { width: 44px; height: 5px; border-radius: 3px; background: var(--line2); }
  .rq-blk { padding: 12px 16px; }
  .page-head .btn.pri { display: none; }
  .efoot-fix { position: fixed; inset-inline: 0; bottom: 0; z-index: 15; background: var(--surface); border-top: 1px solid var(--line); padding: 11px 12px max(16px, env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; }
  .efoot-fix .btn { width: 100%; height: 52px; }
  /* "המשך" בטלפון: סרגל תחתון ברוחב מלא (כמו "פנייה חדשה"), לא דביק בתוך הכרטיס */
  .ffoot { position: fixed; inset-inline: 0; bottom: 0; z-index: 15; margin: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 11px 16px max(16px, env(safe-area-inset-bottom, 0px)); }
  .rform { padding-bottom: 104px; }
  .ffoot .btn.pri { height: 52px; }
  .toolbar .search { width: 100%; }
  .tbl { min-width: 0; table-layout: auto; }
  .tbl thead { display: none; }
  .tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .tbl td { height: auto; padding: 0; border: 0; white-space: normal; }
  .drawer { position: static; width: auto; max-width: none; border: 1px solid var(--line); border-radius: 14px; box-shadow: none; }
}
@media (min-width: 861px) {
  .efoot-fix { display: none; }
}

/* סרטון הדרכה (25.11.2026) */
.dialog.tut { max-width: 760px; }
.tut-v { display: block; width: 100%; max-height: min(70vh, calc(100vh - 300px)); border-radius: 14px; background: #000; }
.tut-v:not(.wide) { max-width: 340px; margin-inline: auto; }

/* החלפת משתמש במכשיר משותף (26.11.2026) */
.eswap { margin: 2px 0 0; }
.eswap a { color: var(--text); text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; }

/* רק בטלפון / רק במחשב (26.11.2026): כפתור שמופיע בכותרת במחשב ובשורה או בשכבה בטלפון */
@media (min-width: 861px) { .ph-only { display: none !important; } }
.res-h { font-size: var(--l); }
/* לשוניות ניווט (הגדרות): קו תחתון, בשורה משלהן. שונות במראה מהסינון (.seg) */
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); }
.tabs > a { min-height: 44px; min-width: 44px; justify-content: center; display: inline-flex; align-items: center; color: var(--text2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs > a:hover { color: var(--text); }
.tabs > a.on { color: var(--text); font-weight: 600; border-bottom-color: var(--text); }
@media (max-width: 860px) {
  /* עובד בטלפון: המשפט הקצר והכפתור באותה שורה, כדי שהשיחה תקבל את רוב המסך */
  .rq-tr p { flex: 1 1 0; min-width: 0; }
  .rq-tr .btn { padding: 0 12px; }
}
/* משוב עדין במעבר עכבר (26.11.2026). כבוי אוטומטית למי שביקש פחות תנועה (הכלל הגלובלי למעלה). */
.btn, .ibtn, .lnk, .tb-tab, .tb-arch, .seg > a, .seg > button, .flt, .sel select, a.hrow, .bcard, .ecard, .ql-i, .tg-add, .opt, .rq-threads button, .rq-info {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.bcard:hover, .ecard:hover { border-color: var(--line2); box-shadow: 0 2px 8px rgba(18, 22, 27, .06); }
/* ── סבב 2 (26.11.2026) ── */
/* בשורת מצב: נקודה מובילה אחת (אצל מי), ואחריה מילים עם "·" בלבד. רק המילים בצבע. */
.bcard-r .who ~ .mark::before, .ql-m .who ~ .mark::before, .hrow-nw .who ~ .mark::before { content: "·"; width: auto; height: auto; border-radius: 0; background: none; color: var(--text3); font-weight: 400; }
.stp.sm { font-weight: 400; color: var(--text2); }
/* שעה בשורת השם: "רות · 07:53" */
.mb-n .mb-tm { font-weight: 400; }
.mb-n .mb-tm::before { content: "·"; margin-inline-end: 4px; }
/* בועה בשיחה פרטית: מסגרת מקווקוות, כמו התיבה הפרטית */
.mb.priv { border-style: dashed; border-color: var(--line2); }
/* דהייה בראש השיחה: אין חצי שורה שנחתכת מתחת לכותרת */
.rq-log { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px); }
/* הגדרות: רכיב בחירה בתוך תא ברוחב מלא (היה חתוך) · שם סוג כטקסט, מסגרת רק בריחוף ובמיקוד */
.tbl .sel, .tbl .sel select { width: 100%; }
.tbl.types input.n { border-color: transparent; background: transparent; }
.tbl.types input.n:hover { border-color: var(--line); }
.tbl.types input.n:focus { border-color: var(--text); background: var(--surface); }
/* בהגדרות האווטר מסומן (אין לשונית ניווט להגדרות) */
.tb-me.on .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.efold > summary .bcnt { text-decoration: none; }
/* שורת "סוג חדש" היא שדה ריק: המסגרת נשארת, אחרת לא רואים שאפשר לכתוב */
.tbl.types tr[data-t=""] input.n { border-color: var(--line2); background: var(--surface); }
