/* ===== מערכת עיצוב =====
   מובייל קודם: ניווט תחתון בטלפון, ניווט צד מ-900px. כהה/בהיר לפי המכשיר.
   צבעי הסטטוסים מגיעים מהשרת ומוזרקים דרך CSSOM (ראו js/core.js) — אין style inline, כדי שה-CSP יישאר הדוק. */

:root {
  --bg: #f3f2ec; --surface: #ffffff; --surface-2: #f1f0e8; --surface-3: #e8e6db;
  --ink: #1d2118; --ink-2: #3c4235; --muted: #626756; --line: #dedbcd; --line-2: #cfcbba;
  --accent: #4d6034; --accent-2: #5e7442; --accent-ink: #ffffff; --accent-soft: #e5ead9;
  /* ניגודיות ≥ 4.5:1 לטקסט על הרקע הרך שלו ועל surface (AUDIT #29). bad-solid = רקע מלא מתחת לטקסט לבן */
  --warn: #9a5309; --warn-soft: #fbecd6; --bad: #b0402d; --bad-soft: #f8e1dc; --ok: #346e43; --ok-soft: #dfeee2;
  --info: #365f8f; --info-soft: #e0e9f4; --bad-solid: #b0402d;
  --brush: #5b3a8c; --brush-soft: #ece5f6;
  --pur: #6b3fa0; --pur-soft: #eee6f7;
  --none: #8d8d82;
  --shadow: 0 1px 2px rgb(30 35 20 / .06), 0 4px 16px rgb(30 35 20 / .06);
  --shadow-lg: 0 10px 40px rgb(20 25 10 / .22);
  --r: 14px; --r-sm: 10px; --r-xs: 7px;
  --tap: 44px;
  --font: system-ui, "Segoe UI", "Noto Sans Hebrew", "Heebo", "Arial Hebrew", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11130e; --surface: #1a1d16; --surface-2: #22261d; --surface-3: #2b3025;
    --ink: #e8e7dc; --ink-2: #cfcfc2; --muted: #a0a391; --line: #2f3429; --line-2: #3d4335;
    --accent: #a7bc7c; --accent-2: #b8cc8e; --accent-ink: #172010; --accent-soft: #2a3320;
    --warn: #e39a47; --warn-soft: #3a2a17; --bad: #e07a66; --bad-soft: #3b211c; --ok: #7fbf8d; --ok-soft: #1f3324;
    --info: #86aede; --info-soft: #1d2a3a; --none: #7f8176; --bad-solid: #b5432f;
    --brush: #7c5cc4; --brush-soft: #2a2140;
    --pur: #b9a0ea; --pur-soft: #2a2140;
    --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 10px 40px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11130e; --surface: #1a1d16; --surface-2: #22261d; --surface-3: #2b3025;
  --ink: #e8e7dc; --ink-2: #cfcfc2; --muted: #a0a391; --line: #2f3429; --line-2: #3d4335;
  --accent: #a7bc7c; --accent-2: #b8cc8e; --accent-ink: #172010; --accent-soft: #2a3320;
  --warn: #e39a47; --warn-soft: #3a2a17; --bad: #e07a66; --bad-soft: #3b211c; --ok: #7fbf8d; --ok-soft: #1f3324;
  --info: #86aede; --info-soft: #1d2a3a; --none: #7f8176; --bad-solid: #b5432f;
  --brush: #7c5cc4; --brush-soft: #2a2140;
  --pur: #b9a0ea; --pur-soft: #2a2140;
  --shadow: 0 1px 2px rgb(0 0 0 / .4); --shadow-lg: 0 10px 40px rgb(0 0 0 / .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
/* overscroll על html ולא רק על body: Chrome ו-Firefox קוראים אותו מהשורש, ושם "משיכה לרענון" נעצרת */
html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font);
  /* none: בלי "משיכה לרענון" (טוענת מחדש וסוגרת טפסים) ובלי האפקט של הדפדפן. משיכה מעבר לתחתית — אצלנו (app.js pullPeek) */
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
/* לוגו הפלוגה כרקע מעומעם (הגדרה של המנהל; core.js applyLogoBg). מאחורי כל התוכן, לא תופס לחיצות, לא בהדפסה */
html.logo-bg::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background: var(--logo-url) center / min(70vmin, 480px) no-repeat;
}
/* במחשב: ממורכז בחלון התוכן, לא בכל המסך (התפריט בצד 220px + קו) */
@media (min-width: 900px) { html.logo-bg::before { inset-inline-start: 221px; } }
:root[data-theme="dark"].logo-bg::before { opacity: .1; }
/* לוגו כהה על שקוף (core.js darkInk): במצב כהה מוצג הפוך, אחרת הקווים נעלמים על הרקע */
:root[data-theme="dark"][data-logo-ink="dark"] .brand-logo, :root[data-theme="dark"][data-logo-ink="dark"].logo-bg::before,
.logo-tile.dark.inv img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-logo-ink="dark"] .brand-logo,
  :root:not([data-theme="light"])[data-logo-ink="dark"].logo-bg::before { filter: invert(1) hue-rotate(180deg); }
}
@media print { html.logo-bg::before { display: none; } }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 20px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0; }
a { color: var(--accent); }
.num, bdi { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 650; }
.hidden { display: none !important; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.gap-lg { gap: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 20px; height: 20px; flex: none; } /* ברירת מחדל לאייקונים — מקומות ספציפיים דורסים */
.item > svg:last-child { width: 18px; height: 18px; color: var(--muted); }

/* ===== שלד ===== */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line); padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
}
.topbar .title { font-size: 17px; font-weight: 700; }
.topbar .sub { font-size: 12.5px; color: var(--muted); }
.main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 14px 16px 10px; }
/* מספר הגרסה בתחתית — לדעת אם הטלפון כבר על העדכון. בטלפון מתחת לו נשאר מקום לסרגל הניווט */
.app-ver { text-align: center; font-size: 11.5px; color: var(--muted); padding: 6px 16px 100px; font-variant-numeric: tabular-nums; }
.app-ver button { font: inherit; color: inherit; background: none; border: 0; padding: 6px 10px; text-decoration: none; cursor: pointer; }
.main.narrow { max-width: 640px; }
/* מרווח אחיד בין השורות של כל מסך (סרגל, מונים, חיפוש, סינון, רשימה). עוטף שמכיל כמה שורות — class="vstack".
   margin ולא gap: מרווחים גדולים יותר שכבר מוגדרים (כותרות מקטע) מתמזגים איתו ולא מצטברים */
.main > :not(:first-child), .main .vstack > :not(:first-child) { margin-top: 12px; }
/* מקום שעוד לא מולא (למשל מונים בלשונית בלי מונים) — לא מוסיף מרווח כפול */
.main > :empty:not(.skel), .main .vstack > :empty:not(.skel) { margin-top: 0; }
@media (min-width: 900px) { .main:not(.narrow):not([data-route="plan"]) { max-width: 860px; } }
/* תכנון במחשב: הטבלה על כל רוחב החלון (0.85.1) */
@media (min-width: 900px) { .main[data-route="plan"] { max-width: none; } }

.nav {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: flex; background: var(--surface);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 600; min-height: 56px; position: relative;
}
.nav a svg { width: 24px; height: 24px; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.nav .dot { position: absolute; top: 6px; inset-inline-start: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--warn); }

.nav .brand { display: none; } /* לפני ה-media: בחלון רחב הוא מוצג */
@media (min-width: 900px) {
  .shell { flex-direction: row; }
  .nav {
    position: sticky; inset: 0 auto auto auto; height: 100vh; height: 100dvh; width: 220px; flex: none; flex-direction: column;
    border-top: 0; border-inline-end: 1px solid var(--line); padding: 16px 10px; gap: 4px;
  }
  .nav .brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 16px; }
  .nav a { flex: none; flex-direction: row; gap: 12px; font-size: 14.5px; padding: 10px 12px; border-radius: var(--r-sm); min-height: 0; }
  .nav a[aria-current="page"] { background: var(--accent-soft); }
  .nav a[aria-current="page"]::before { display: none; }
  .nav .dot { position: static; margin-inline-start: auto; }
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .main { padding: 20px 28px 10px; }
  .app-ver { padding-bottom: 24px; }
  .topbar { padding: 14px 28px; }
}
.nav .brand { font-weight: 750; font-size: 16px; }
.nav .brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }

/* ===== לוגו הפלוגה ותמונות (photo.js) ===== */
.brand-logo { display: block; object-fit: contain; }
.brand-logo[hidden] { display: none; }
.brand-slot { display: contents; }
.nav .brand .brand-logo { width: 40px; height: 40px; flex: none; }
.brand-wrap { display: grid; place-items: center; }
.brand-logo.lg { width: 96px; height: 96px; }
/* מסך הכניסה: הסמל הרגיל רק אם הלוגו לא נטען */
.brand-wrap .brand-logo:not([hidden]) + .logo { display: none; }
.spin-sm { display: grid; place-items: center; color: var(--muted); }
.spin-sm svg { width: 22px; height: 22px; }
.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: 14px;
}
.av img, .avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar { overflow: hidden; padding: 0; }
.av.av-md { width: 44px; height: 44px; font-size: 16px; }
.av.av-lg { width: 64px; height: 64px; font-size: 22px; }
.acct-photo { gap: 14px; align-items: center; }
.crop-wrap { display: grid; place-items: center; }
.crop { width: 280px; height: 280px; max-width: 100%; aspect-ratio: 1; border-radius: var(--r); background: #000; touch-action: none; cursor: grab; }
/* לוגו: משבצות מראות איפה הלוגו שקוף */
.crop.sq {
  background-color: #fff;
  background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%),
    linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
  box-shadow: inset 0 0 0 2px var(--line); }
.logo-row { gap: 14px; align-items: center; }
.logo-prev { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); }
.logo-prev .brand-logo { width: 52px; height: 52px; }
.logo-previews { justify-content: center; gap: 16px; align-items: flex-end; }
.logo-tile { width: 96px; height: 96px; border-radius: var(--r); display: grid; place-items: center; padding: 10px; border: 1px solid var(--line); }
.logo-tile.light { background: #f3f2ec; }
.logo-tile.dark { background: #1d2118; }
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.icon-prev { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow); }
.err-list { margin: 4px 0 0; padding-inline-start: 18px; display: grid; gap: 2px; }
.print-logo { display: block; max-height: 64px; max-width: 160px; margin-bottom: 6px; }

/* ===== כרטיסים ורשימות ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card.pad { padding: 14px; }
.card + .card, .section + .section { margin-top: 12px; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { flex: 1; }
/* משימה בשבצ"ק: שם + כפתורים בשורה אחת, האזהרות בשורה משלהן — כדי שבטלפון הכפתורים לא יידחקו מחוץ למסך */
.mission-head { flex-wrap: wrap; row-gap: 6px; }
.mission-head h3 { min-width: 0; overflow-wrap: anywhere; }
.mission-head .badges { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 18px 2px 8px; }
.section-title h2 { flex: 1; font-size: 15px; color: var(--ink-2); }

.list { list-style: none; margin: 0; padding: 0; }
.list > .conf { padding: 10px 14px; border-top: 1px solid var(--line); }
.list > .conf:first-child { border-top: 0; }
.item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px;
  border-top: 1px solid var(--line); background: none; width: 100%; text-align: start; border-inline: 0; border-bottom: 0;
}
.list > .item:first-child, .list > li:first-child > .item { border-top: 0; }
button.item:hover, a.item:hover { background: var(--surface-2); }
button.item:active { background: var(--surface-3); }
/* הכנה לסבב → קליטה: תיבת בחירה ליד שורה שנלחצת (הכפתור הפנימי בלי מסגרת וריווח משלו) */
.prep-row { padding-block: 0; padding-inline-end: 0; }
.prep-row > button.item { border-top: 0; flex: 1; min-width: 0; padding-inline-start: 4px; }
.prep-row > .call-btn { flex: none; margin-inline-end: 10px; }
.item .main-line { font-weight: 600; }
.item .meta { font-size: 13px; color: var(--muted); }
.item.sel { background: var(--accent-soft); }
.item.stale { position: relative; }
.item.stale::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--warn); }
.item .check {
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center;
}
.item.sel .check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.item .check svg { width: 14px; height: 14px; }
.item:not(.sel) .check svg { visibility: hidden; }

.group-head {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-2);
  border-top: 1px solid var(--line); font-weight: 650; font-size: 14px; width: 100%; border-inline: 0; border-bottom: 0; text-align: start;
}
.group-head:first-child { border-top: 0; border-radius: var(--r) var(--r) 0 0; }
.group-head .count { font-weight: 500; color: var(--muted); font-size: 12.5px; }
/* כיתה בתוך מחלקה (att.js squadHead): כותרת משנה — מוזחת, קטנה, נפתחת ונסגרת */
.sub-head {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 4px 14px; padding-inline-start: 30px;
  border: 0; border-top: 1px solid var(--line); background: var(--surface); text-align: start;
  color: var(--ink-2); font: inherit; font-weight: 600; font-size: 13px;
}
.sub-head .count { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.sub-head .chev { display: inline-flex; transition: transform .15s; }
.sub-head .chev svg { width: 14px; height: 14px; }
.sub-head[aria-expanded="false"] .chev { transform: rotate(90deg); }

/* משוב (feedback.js) */
.fb-item .main-line { font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.fb-badges { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.fb-reply { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; font-size: 13px; color: var(--ink); }
.fb-reply svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.fb-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.group-head .chev { transition: transform .15s; }
.group-head[aria-expanded="false"] .chev { transform: rotate(90deg); }

/* ===== כפתורים ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap); padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font-weight: 600;
  text-decoration: none; color: var(--ink); white-space: nowrap; user-select: none; transition: background .12s, transform .06s;
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger.solid { background: var(--bad-solid); color: #fff; border-color: var(--bad-solid); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13.5px; border-radius: var(--r-xs); }
.btn.lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn.block { display: flex; width: 100%; }
.btn.block > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn.icon { padding: 0; width: var(--tap); flex: none; }
.btn.sm.icon { width: 34px; }
/* אזור לחיצה מוגדל, בלי לשנות את המראה (האצבע רחבה מהכפתור) */
.btn.sm, .toast .btn, .check-btn, .avatar { position: relative; }
.btn.sm::before, .toast .btn::before, .avatar::before { content: ""; position: absolute; inset: -5px; }
.check-btn::before { content: ""; position: absolute; inset: -8px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.busy::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.seg { display: flex; background: var(--surface-3); border-radius: var(--r-sm); padding: 3px; gap: 3px; }
.seg button {
  flex: 1; border: 0; background: none; border-radius: 8px; min-height: 36px; font-weight: 600; font-size: 14px; color: var(--muted); padding: 0 10px; white-space: nowrap;
}
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.seg svg { width: 17px; height: 17px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.sug-pair { display: inline-flex; align-items: center; }   /* המלצה לפי תפקיד בכרטיס: chip + ✕ שחרור */
/* בבוחר החיילים: שורת "מיון: …, ואז …" שפותחת את בחירת המיון */
.sort-sum { align-self: flex-start; color: var(--muted); gap: 4px; padding-inline: 4px; }
.sort-sum .v { color: var(--ink); font-weight: 600; }
/* קבוצת סינון בפאנל: כותרת קטנה ("סוג", "מחלקה") מעל הצ'יפים, כדי שכמה קבוצות לא ייראו כגוש אחד */
.fgroup { display: flex; flex-direction: column; gap: 5px; }
.flabel { font-size: 12.5px; font-weight: 650; color: var(--muted); }
/* פעולה משנית בסוף רשימה (למשל "מכשירים חדשים") */
.list-foot { justify-content: center; padding-top: 4px; }
/* לשוניות צפופות: בטלפון בלי אייקונים, כדי שיישאר מקום לכפתור הראשי באותה שורה */
.seg.tight { min-width: 0; }
@media (max-width: 599px) { .seg.tight svg { display: none; } .seg.tight button { padding: 0 6px; } }
/* אייקון בתפריט "עוד" */
.menu-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); flex: none; }
.menu-ic svg { width: 18px; height: 18px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip .n { font-variant-numeric: tabular-nums; opacity: .75; }
.chip.st[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: var(--c-on, #fff); }

/* ===== סטטוס ===== */
.pill {
  --c: var(--none);
  display: inline-flex; align-items: center; gap: 6px; padding-block: 3px; padding-inline: 10px 9px; border-radius: 999px; font-size: 13px; font-weight: 650;
  background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: color-mix(in srgb, var(--c) 70%, var(--ink)); white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.wait-tag { display: inline-block; margin-inline-start: 4px; padding: 1px 6px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--warn-soft); color: var(--warn); white-space: nowrap; }
.pill.none { --c: var(--none); background: transparent; border: 1.5px dashed var(--line-2); color: var(--muted); }
.pill.none::before { display: none; }
.pill.quiet { background: transparent; color: var(--muted); font-weight: 550; padding-inline: 2px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--none)); flex: none; display: inline-block; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; padding: 1px 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--ink-2); white-space: nowrap;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.pur { background: var(--pur-soft); color: var(--pur); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.dash { background: transparent; border: 1px dashed var(--warn); color: var(--warn); }
/* "צפייה בלבד" בסרגל כלים (roBadge עם סיבה): בגובה הכפתורים שלידו, ונוח ללחיצה */
button.badge.ro { border: 0; cursor: pointer; font-size: 13px; padding: 0 12px; min-height: var(--tap); border-radius: var(--r-sm); }

/* ===== מדדים ===== */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; text-align: start;
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
button.kpi:hover { background: var(--surface-2); }
.kpi[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.kpi .v { font-size: 24px; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
/* מספרים לוגיסטיים (logistics.js): כרטיס בתכנון / ב"שלי" */
.logi { margin-block-end: 12px; }
.logi .hint { padding: 8px 14px 12px; }
.logi-t th .link-btn { font-weight: 650; white-space: nowrap; }
.logi-sub { display: block; }
.kpi.bad .v { color: var(--bad); }
.kpi.warn .v { color: var(--warn); }
.kpi.pur .v { color: var(--pur); }
.kpi.ok .v { color: var(--ok); }
@media (max-width: 520px) { .kpis { gap: 6px; } .kpi { padding: 6px 9px; gap: 0; } .kpi .v { font-size: 20px; } .kpi .l { font-size: 12px; } }
@media (max-width: 380px) { .kpi .v { font-size: 18px; } .kpi { padding: 6px 7px; } }

/* ===== טפסים ===== */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.mini-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mini-field > span { font-size: 12px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--bad); font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--surface); font-size: 16px; /* 16px: iOS לא עושה זום */
}
textarea.input { padding: 10px 12px; min-height: 80px; resize: vertical; }
.input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); border-color: var(--accent); }
.input.bad { border-color: var(--bad); }
/* combo (ui.js): כפתור שנראה כמו שדה ופותח רשימה בגיליון */
.input.combo { display: flex; align-items: center; gap: 8px; text-align: start; cursor: pointer; color: var(--ink); }
.input.combo .combo-v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.input.combo .combo-v.muted { color: var(--muted); }
.input.combo > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.combo-opt > svg:last-child { color: var(--accent); }
.combo-add { margin-top: 10px; }
.cmb-empty { padding: 14px; margin: 0; }
.search { position: relative; }
.search .input { padding-inline-start: 38px; }
.search svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
/* AUDIT #35: שדה טקסט חופשי עם dir="auto" מקבל את הכיוון של מה שהוקלד, כך ש-"Dan." לא הופך ל-".Dan".
   הדפדפן נותן לשדה ריק (או לטיני) ltr, ולכן כאן בכוונה צד פיזי: היישור נשאר לימין כמו בכל השדות (גם הסמן בשדה ריק),
   ה-placeholder העברי נשאר rtl, ובחיפוש הריפוד נשאר בצד של סמל הזכוכית המגדלת (שנשאר מימין) */
.input[dir="auto"] { text-align: start; }
.input[dir="auto"]:placeholder-shown { direction: rtl; }
.search .input[dir="auto"] { padding-inline-start: 38px; padding-inline-end: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .grid-2.stack { grid-template-columns: 1fr; } }
.toggle { display: flex; align-items: center; gap: 10px; min-height: var(--tap); font-weight: 600; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.stepper button { width: 38px; height: 38px; border: 0; background: var(--surface-2); font-size: 18px; font-weight: 700; }
.stepper input { width: 48px; height: 38px; border: 0; text-align: center; background: var(--surface); font-size: 16px; font-variant-numeric: tabular-nums; }

/* ===== סטטוס גדול לבחירה ===== */
.status-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 520px) { .status-grid { grid-template-columns: repeat(3, 1fr); } }
.status-btn {
  --c: var(--none);
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1.5px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: color-mix(in srgb, var(--c) 8%, var(--surface));
  font-weight: 700; font-size: 15px; text-align: start;
}
.status-btn::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; }
.status-btn[aria-pressed="true"] { background: var(--c); color: var(--c-on, #fff); border-color: var(--c); }
.status-btn[aria-pressed="true"]::before { background: #fff; }
.status-btn.clear { border: 1.5px dashed var(--line-2); background: var(--surface); color: var(--ink-2); }
.status-btn.clear::before { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--line-2) 2px 3.5px); border: 1px solid var(--line-2); }
.status-btn.clear[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-style: solid; border-color: var(--ink); }
.item.list-row .was { flex-basis: 100%; padding-inline-start: 84px; }

/* ===== גיליון (bottom sheet בטלפון, דיאלוג במחשב) ===== */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgb(10 12 6 / .45); animation: fade .15s; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; background: var(--surface); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: up .2s cubic-bezier(.2, .8, .2, 1);
}
.sheet.full { height: 100vh; height: 100dvh; max-height: none; border-radius: 0; max-width: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { flex: 1; }
.sheet-body { padding: 14px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.sheet-body > * { flex-shrink: 0; } /* אחרת שורת צ'יפים נגללת (overflow) מתכווצת לאפס */
.sheet-foot { padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn.icon { flex: none; }
.grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 8px auto -4px; }
@media (min-width: 700px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 18px; }
  .sheet.full { height: auto; max-height: 92vh; max-height: 92dvh; border-radius: 18px; max-width: 760px; }
  /* תצוגת סבב מחלקתי (rotations.js): כל המסך, כמו הטבלה של דו"ח 1 (בקשת המשתמש 2026-11-16) */
  .sheet.full.rp-sheet { width: 100%; max-width: none; height: calc(100vh - 48px); height: 100%; max-height: none; }
  .grab { display: none; }
}
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

/* ===== הודעות ===== */
.toasts { position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; width: fit-content; padding: 10px; padding-inline-start: 16px;
  border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14px; animation: up .2s;
}
.toast.bad { background: var(--bad-solid); color: #fff; }
/* החלקה לסגירה (core.js swipeAway): --dx נקבע מה-JS; touch-action משאיר גלילה אנכית לדפדפן */
.toast { touch-action: pan-y; transform: translateX(var(--dx, 0)); transition: transform .18s, opacity .18s; user-select: none; -webkit-user-select: none; }
.toast.drag { transition: none; opacity: .75; }
.toast.out { opacity: 0; }
.toast .btn { min-height: 32px; background: transparent; color: inherit; border-color: color-mix(in srgb, currentColor 40%, transparent); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 600; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.bad { background: var(--bad-soft); color: var(--bad); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.ok { background: var(--ok-soft); color: var(--ok); }
.banner svg { width: 20px; height: 20px; flex: none; }
/* תובנות (insights.js): שורה לחיצה במסך + הגיליון */
.banner.ins { width: 100%; border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 600; text-align: start; min-height: var(--tap); }
.ins-group { margin-block: 14px; }
.ins-group h4 { margin: 0 0 6px; font-size: 14px; }
.ins-row { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; margin-block-end: 6px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 13.5px; }
.ins-row.hi { background: var(--warn-soft); color: var(--warn); }
.ins-row.hi .chip { color: var(--ink); }
.ins-row.seen { background: none; border: 1px dashed var(--line-2); color: var(--muted); }
/* D5: דירוג בגיליון "שבץ" — מספר מקום, פס צד לפי המלצה, פס עומס (5 עמודות) */
.rank { flex: none; inline-size: 26px; block-size: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.rank.top { background: var(--ok-soft); color: var(--ok); }
.item.sug-good { border-inline-start: 3px solid var(--ok); }
.item.sug-warn { border-inline-start: 3px solid var(--warn); }
.item.sug-bad { border-inline-start: 3px solid var(--bad); }
.sug-cues { display: flex; flex-wrap: wrap; gap: 4px; margin-block-start: 4px; }
.meter { flex: none; display: inline-flex; gap: 2px; align-items: flex-end; block-size: 14px; }
.meter i { inline-size: 4px; block-size: 6px; border-radius: 1px; background: var(--line-2); }
.meter i:nth-child(2) { block-size: 8px; }
.meter i:nth-child(3) { block-size: 10px; }
.meter i:nth-child(4) { block-size: 12px; }
.meter i:nth-child(5) { block-size: 14px; }
.meter.m1 i:nth-child(-n+1), .meter.m2 i:nth-child(-n+2) { background: var(--ok); }
.meter.m3 i:nth-child(-n+3) { background: var(--accent); }
.meter.m4 i:nth-child(-n+4) { background: var(--warn); }
.meter.m5 i { background: var(--bad); }
.ins-pak { align-items: center; gap: 10px; margin-block-end: 6px; }
.offline-bar { position: sticky; top: 0; z-index: 25; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .5; margin-bottom: 6px; }
.empty .t { font-weight: 650; color: var(--ink-2); }

.skel { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 300% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -150% 0; } }

/* פס פעולה צף (בחירה מרובה) */
.actionbar {
  position: fixed; z-index: 35; inset-inline: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
  padding: 8px; padding-inline-start: 14px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); animation: up .2s;
  max-width: 620px; margin: 0 auto;
}
.actionbar .btn.primary { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.actionbar .btn.ghost { color: var(--bg); }
@media (min-width: 900px) { .actionbar { bottom: 20px; inset-inline-start: 240px; } }
/* שלושה כפתורים בטלפון (דו"ח 1 + "צפייה בבקשה"): המונה בשורה משלו, הכפתורים מתחתיו */
@media (max-width: 519px) { .actionbar.wide3 { flex-wrap: wrap; } .actionbar.wide3 > .grow { flex-basis: 100%; }
  .actionbar.wide3 > .btn { flex: 1 1 0; justify-content: center; } }

/* ===== לוח (board) ===== */
.board-row .who { min-width: 0; flex: 1; }
.board-row .who .n { font-weight: 650; }
.board-row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; max-width: 48%; }
.board-row .loc { font-size: 13px; color: var(--muted); }
/* כפתור אייקון עם מילה: בטלפון המילה קטנה מתחת לאייקון (כמו בסרגל התחתון), בחלון רחב לידו */
.btn.cap { padding: 0 12px; flex: none; }
@media (max-width: 599px) {
  .btn.cap { flex-direction: column; gap: 1px; padding: 3px 7px 2px; min-width: 50px; }
  .btn.cap svg { width: 18px; height: 18px; }
  .btn.cap .cl { font-size: 12px; line-height: 1.15; }
}
/* סינון: מאחורי כפתור "סינון" בכל רוחב (גם במחשב — אחרת הפאנל דוחף את הרשימה מתחת למסך) */
.fbtn { position: relative; }
.fbtn.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fbtn .fcount {
  position: absolute; top: -6px; inset-inline-end: -6px; min-width: 18px; height: 18px; border-radius: 999px; padding: 0 5px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 750; line-height: 18px; text-align: center;
}
.fsum { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); padding-inline-start: 4px; }
.fpanel.closed { display: none; }
.badge.ro { background: var(--surface-3); color: var(--ink-2); gap: 5px; white-space: nowrap; }
.badge.ro svg { width: 14px; height: 14px; }

/* ===== טבלת תכנון ===== */
.plan-wrap { overflow: auto; max-height: calc(100vh - 250px); max-height: calc(100dvh - 250px); border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); }
@media (min-width: 900px) { .plan-wrap { max-height: calc(100vh - 210px); max-height: calc(100dvh - 210px); } }
table.plan { border-collapse: separate; border-spacing: 0; font-size: 12px; }
table.plan th, table.plan td { border-bottom: 1px solid var(--line); border-inline-start: 1px solid var(--line); padding: 0; }
table.plan thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2); font-weight: 650; }
table.plan .name {
  position: sticky; inset-inline-start: 0; z-index: 1; background: var(--surface); text-align: start; padding: 0 10px;
  min-width: 112px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 13px; border-inline-start: 0;
}
table.plan thead .name { z-index: 3; background: var(--surface-2); }
table.plan th.name.lvb { background: var(--warn-soft); color: var(--warn); }
/* שם השורה: מודגש כשיש בה תא נבחר, ובמחשב גם כשהעכבר על השורה — לראות לאיזה חייל התא שייך (2026-11-16) */
table.plan th.name.selrow { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { table.plan tbody tr:hover > th.name:not(.selrow) { background: var(--accent-soft); } }
/* העמודה שמתחת לעכבר (plan.js hovCol): אותו צבע כמו השם; היום (שכבר בצבע הזה) מקבל גם קו */
table.plan thead th.day.hovcol { background: var(--accent-soft); color: var(--accent); }
table.plan thead th.day.today.hovcol { box-shadow: inset 0 -2px 0 var(--accent); }
.dot.lvb { display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--warn-soft); border: 1.5px solid var(--warn); box-sizing: border-box; }
table.plan .plat td { background: var(--surface-3); font-weight: 700; font-size: 12px; padding: 5px 10px; position: sticky; inset-inline-start: 0; }
/* Chrome באנדרואיד: אחרי גלילה, עמודת השמות הדביקה נשארה מצוירת ישן (0.87.5–0.87.7 לא עזרו). plan.js מחליף את .rp כשהגלילה
   נעצרת; background-clip משנה את הציור אבל לא את המראה (הגבול אטום) — וכך התאים הדביקים מצוירים מחדש (0.87.8) */
.plan-wrap.rp table.plan .name, .plan-wrap.rp table.plan .plat td, .plan-wrap.rp table.plan tfoot th, .plan-wrap.rp table.plan tfoot td { background-clip: padding-box; }
table.plan .day { width: 34px; min-width: 34px; height: 40px; text-align: center; line-height: 1.15; padding: 3px 0; }
table.plan .day .d { font-size: 12px; color: var(--muted); font-weight: 500; }
table.plan .day.today { background: var(--accent-soft); color: var(--accent); }
table.plan .day.we { color: var(--muted); }
/* חגים (holidays.js): כותרת היום צבועה — יום חג חזק יותר */
table.plan .day.hol { background: var(--warn-soft); color: var(--warn); }
table.plan .day.hol .d { color: var(--warn); }
table.plan .day.hol2 { background: var(--warn); color: var(--surface); }
table.plan .day.hol2 .d { color: var(--surface); }
.dot.hol { display: inline-block; background: var(--warn); }
table.plan .cell { width: 34px; height: 36px; }
table.plan .cell button {
  --c: transparent; --lvm: none; display: block; width: 100%; height: 36px; border: 0; background: var(--lvm) no-repeat top 1px right 1px / 11px 11px, var(--c); color: var(--c-on, #fff); font-weight: 700; font-size: 12px; padding: 0;
}
table.plan .cell button.none { background: var(--lvm) no-repeat top 1px right 1px / 11px 11px, repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--line) 70%, transparent) 5px 6px); color: var(--muted); }
/* יום שהתכנון שלו עוד לא פורסם לי (05_attendance.gs hiddenDays_) — קווקוו צפוף לשני הכיוונים, שונה מ"לא עודכן" */
table.plan .cell button.unpub { background: var(--lvm) no-repeat top 1px right 1px / 11px 11px, repeating-linear-gradient(45deg, var(--line-2) 0 1.5px, transparent 1.5px 5px), repeating-linear-gradient(135deg, var(--line-2) 0 1.5px, transparent 1.5px 5px); }
table.plan .cell.today button { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent); }
table.plan .cell button.sel { box-shadow: inset 0 0 0 3px var(--ink), inset 0 0 0 5px var(--surface); }
/* בקשת יציאה (att.js leaveDays): אושרה = נקודה מלאה בפינה, ממתינה = טבעת. בצבע הדיו עם שוליים בצבע המשטח — נראה על כל צבע סטטוס.
   הסימן הוא שכבת רקע של הכפתור (--lvm), לא ::after ממוקם: אלמנט ממוקם בתוך הטבלה נשאר מאחור בגלילה לרוחב בטלפון ומכסה
   את עמודת השמות (0.87.5). right = תחילת השורה ב-RTL */
/* רמת חשיבות (0.94.0, leave.js PRI): --lvc צובע את הסימן — גבוהה אדום, בינונית צהוב, נמוכה כחול; בלי רמה (בקשה ישנה) = דיו.
   צבעים קבועים בשתי הערכות: --bad / --warn כהים כמעט זהים בסימן של 7px; השוליים בצבע המשטח מפרידים אותם מצבע הסטטוס */
.lv-h, .pri-tag[data-p="h"] { --lvc: #e5372a; } .lv-m, .pri-tag[data-p="m"] { --lvc: #f5b400; } .lv-l, .pri-tag[data-p="l"] { --lvc: #2f7de1; }
table.plan .cell button.lv { --lvm: radial-gradient(circle, var(--lvc, var(--ink)) 0 3px, var(--surface) 3.5px 5px, transparent 5.5px); }
table.plan .cell button.lvp { --lvm: radial-gradient(circle, var(--surface) 0 1.5px, var(--lvc, var(--ink)) 2px 3.5px, var(--surface) 4px 5px, transparent 5.5px); }
.dot.lv, .dot.lvp { display: inline-block; border-radius: 50%; box-sizing: border-box; background: var(--lvc, var(--ink)); box-shadow: 0 0 0 1.5px var(--surface); }
.dot.lvp { background: var(--surface); border: 1.5px solid var(--lvc, var(--ink)); }
.pri-tag { display: inline-flex; align-items: center; gap: 4px; margin-inline-end: 6px; font-weight: 600; }
.chip .dot.lv { margin-inline-end: 4px; }
.dot.lv, .dot.lvp { width: 9px; height: 9px; }
@media (pointer: coarse) {
  table.plan .day, table.plan .cell { width: 40px; min-width: 40px; }
  table.plan .cell, table.plan .cell button { height: 42px; }
  table.plan .cell button { font-size: 12px; }
}
@media (max-width: 520px) { table.plan .name { min-width: 96px; max-width: 120px; padding: 0 8px; } }
/* טווח ארוך (סבב): קו בתחילת כל שבוע, עמודות צרות יותר במחשב, וסיכום ימים בבסיס לכל חייל */
/* קו עבה בין שבת לראשון (בקשת המשתמש 2026-11-16), בכל השורות — גם בסיכומים */
table.plan .wk { border-inline-start: 3px solid #000; }
table.plan .tot { min-width: 44px; padding: 0 6px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--muted); background: var(--surface-2); }
table.plan thead .tot { font-size: 12px; }
@media (pointer: fine) {
  table.plan.long .day, table.plan.long .cell { width: 28px; min-width: 28px; }
  table.plan.long .cell button { font-size: 12px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
/* מקרא דו"ח 1 (0.92.2): כותרת קטנה "מקרא" + חץ, באותו גודל וצבע של המקרא; נסגר ונפתח */
.leg-box { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.leg-tog { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 2px; background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; }
.leg-tog .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .15s; }
.leg-tog[aria-expanded="true"] .chev { transform: rotate(180deg); }
.legend[hidden] { display: none; }

/* ===== הגדרות תכנון סבב (planrules.js) ===== */
.pr-sec { display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.pr-sec h3 { margin: 0; font-size: 15px; }
.pr-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pr-pair { gap: 8px 16px; }
.pr-pair label, .pr-item label.row { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.pr-sec .num-input { width: 72px; flex: none; }
.pr-line { align-items: center; gap: 8px; }
.chip.pr-person { display: inline-flex; align-items: center; gap: 4px; }
.pr-x { border: 0; background: none; padding: 0; color: var(--muted); display: inline-flex; cursor: pointer; position: relative; }
.pr-x::before { content: ""; position: absolute; inset: -9px; } /* שטח לחיצה 32px, המראה נשאר 14px */
.pr-x svg { width: 14px; height: 14px; }

/* המלצת תכנון (planner.js): dr = שינוי מוצע — צבע הסטטוס המוצע עם פסים ומסגרת מקווקוות; drx = הוצא מההחלה */
table.plan .cell button.dr { background: var(--lvm) no-repeat top 1px right 1px / 11px 11px, repeating-linear-gradient(45deg, rgba(255, 255, 255, .32) 0 3px, transparent 3px 7px), var(--c); outline: 2px dashed var(--ink); outline-offset: -3px; }
table.plan .cell button.drx { outline: 2px dotted var(--muted); outline-offset: -3px; }
.dot.dr { background: repeating-linear-gradient(45deg, var(--line-2) 0 2px, transparent 2px 4px); outline: 1.5px dashed var(--ink); }
.dot.drx { background: transparent; outline: 1.5px dotted var(--muted); }
/* עדכון של מ"מ שממתין לאישורך (att.js attReview) — מסגרת כתומה עבה, קבועה בשתי הערכות; השוליים בצבע המשטח מפרידים אותה מצבע הסטטוס */
table.plan .cell button.rv { outline: 3px solid #ff8a00; outline-offset: -3px; box-shadow: inset 0 0 0 4px var(--surface); }
table.plan .cell button.rv.sel { box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 6px var(--ink); }
.dot.rv { width: 12px; height: 12px; border-radius: 3px; background: var(--surface); outline: 3px solid #ff8a00; outline-offset: -3px; }
.pr-draft { align-items: stretch; gap: 6px; }
.pr-h { margin: 0; padding: 12px 14px 4px; font-size: 15px; }
.pr-run { align-items: stretch; gap: 8px; }
/* ===== שלי ===== */
.hero { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero .big { font-size: 26px; font-weight: 800; }
.timeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.tl-day { --c: transparent; border-radius: 10px; padding: 6px 0; text-align: center; background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.tl-day .dw { font-size: 12px; color: var(--muted); font-weight: 600; }
.tl-day .dd { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tl-day .bar { height: 6px; border-radius: 3px; background: var(--c); margin: 5px 6px 0; }
.tl-day.none .bar { background: var(--line-2); opacity: .5; }
.tl-day.unpub .bar { background: repeating-linear-gradient(45deg, var(--line-2) 0 2px, transparent 2px 5px); opacity: 1; }
/* שם הסטטוס: עד שתי שורות ("משימה/קורס" = שורה לכל חלק, me.js; מילה ארוכה נשברת) — לא נחתך ב-… (AUDIT #29) */
.tl-day .sn {
  font-size: 12px; line-height: 1.2; margin-top: 3px; color: var(--ink-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tl-day.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.tl-day.past { opacity: .55; }
.tl-head { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; }
.cal-sum { gap: 14px; margin-top: 10px; color: var(--ink-2); }

/* ===== כניסה ===== */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; text-align: center; display: flex; flex-direction: column; gap: 16px; }
.logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.logo svg { width: 36px; height: 36px; }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 6px 0; direction: ltr; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); }
.pin-dots span.on { background: var(--ink); border-color: var(--ink); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; direction: ltr; }
.keypad button {
  height: 60px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font-size: 24px; font-weight: 600; box-shadow: var(--shadow);
}
.keypad button:active { background: var(--surface-3); }
.keypad button.fn { background: transparent; box-shadow: none; border-color: transparent; font-size: 15px; }
/* אישור: בולט כשאפשר ללחוץ, דהוי כשהקוד עוד לא מלא */
.keypad button[data-k="ok"]:not(:disabled) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.keypad button:disabled { opacity: .35; }

/* ===== חתימה ===== */
.sigpad { position: relative; border: 2px dashed var(--line-2); border-radius: var(--r); background: #fff; touch-action: none; height: 220px; }
.sigpad canvas { width: 100%; height: 100%; display: block; border-radius: var(--r); }
.sigpad .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #6b6b63; pointer-events: none; font-weight: 600; }
.sigpad.has .ph { display: none; }
.sigpad::after { content: ""; position: absolute; inset-inline: 24px; bottom: 44px; border-bottom: 1.5px solid var(--line-2); pointer-events: none; }

/* ===== טבלה (למחשב) ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: start; font-size: 12.5px; color: var(--muted); font-weight: 650; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr.stale td:first-child { box-shadow: inset 4px 0 0 var(--warn); }
table.data tr:last-child td { border-bottom: 0; }
table.data td.zero { color: var(--muted); opacity: .55; }
table.data tr.sum-total td { font-weight: 700; border-top: 2px solid var(--line); }
.only-wide { display: none; }
@media (min-width: 900px) { .only-wide { display: revert; } .only-narrow { display: none !important; } }

/* ===== הדפסה ===== */
#print-area { display: none; }
@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block; color: #000; font-size: 13px; }
  #print-area table { width: 100%; border-collapse: collapse; }
  #print-area th, #print-area td { border: 1px solid #555; padding: 5px 7px; text-align: start; }
  #print-area h1 { font-size: 18px; margin-bottom: 4px; }
  #print-area .sig { max-width: 240px; border-bottom: 1px solid #000; }
  #print-area .sig-block { break-inside: avoid; margin-block-end: 8px; }
}

/* ===== תוספות ===== */
body.noscroll { overflow: hidden; }
.datenav { position: relative; }
.datebtn { justify-content: center; font-variant-numeric: tabular-nums; }
.datebtn.off { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); font-weight: 600; }
.date-hidden { position: absolute; inset-inline-start: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.skel.line { height: 44px; }
.msg-preview { white-space: pre-wrap; font: inherit; margin: 0; font-size: 14px; }
.item .main-line, .item .meta { display: block; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 750; font-size: 14px; border: 0; }
/* נקודה על האווטאר: יש שינויים שהשרת לא קיבל ("לא נשמרו") */
.av-wrap { position: relative; display: inline-flex; flex: none; }
.av-dot { position: absolute; top: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); border: 2px solid var(--surface); pointer-events: none; }
.av-dot[hidden] { display: none; }
.av-dot.new { background: var(--accent); }
.field.save-row > .label { color: var(--accent); font-weight: 700; }
.chip.save { border-color: var(--accent); }
.kpi-inc { font-size: 12px; color: var(--ink-2); margin-top: -4px; }
.ob-item .meta { overflow-wrap: anywhere; }
.ob-item .meta.bad-t { color: var(--bad); }
.ob-acts { margin-top: 8px; gap: 6px; }

/* ===== כללי ===== */
.center { text-align: center; }
.hint { font-size: 12.5px; color: var(--muted); }
.err { font-size: 13px; color: var(--bad); font-weight: 600; min-height: 1em; }
.err:empty { min-height: 0; }
.bad-t { color: var(--bad); }
.ok-t { color: var(--ok); }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv .hint { margin-top: 2px; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
textarea.mono { white-space: pre; overflow-x: auto; }
.ltr-in { direction: ltr; text-align: left; }
.ltr-in::placeholder { text-align: right; }
.sm-input { min-height: 36px; font-size: 16px; padding: 0 10px; width: 130px; flex: none; }
.time-input { min-height: 36px; font-size: 16px; padding: 0 8px; width: 108px; flex: none; direction: ltr; }
.sm-input.num-input { width: 64px; }
/* שבצ"ק: כותרת משמרת בכרטיס משימה */
.shift-head { display: flex; align-items: center; gap: 6px; padding: 8px 14px 2px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.shift-open { padding: 6px 14px 10px; font-size: 13px; color: var(--warn); }
.shift-edit { padding: 10px 12px; gap: 6px; align-items: center; }
/* "שלי": השבצ"ק של היום — המשמרת הנוכחית מודגשת */
.card.duty { border-color: var(--accent); }
.duty .main-line { font-size: 17px; font-weight: 750; }
.duty-now { background: var(--accent-soft); }
.ghostbtn { border: 0; background: none; padding: 0; text-align: start; font: inherit; color: inherit; min-height: var(--tap); }
.side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; text-align: end; }
svg.spin { animation: spin 1s linear infinite; }
.toggle.sm { min-height: 36px; gap: 6px; font-size: 13px; flex: none; }
.toggle.sm input { width: 18px; height: 18px; }
/* טאבים שהם צ'יפים — נשברים לשורות, כך שכולם גלויים גם בטלפון */
.chips.tabs { margin-bottom: 12px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }
.kpis.four { grid-template-columns: repeat(4, 1fr); }
.bk-line { gap: 8px; }
.input.bk-cnt { width: 6.5rem; flex: none; }
tr.bad-row td { background: var(--bad-soft); }

/* ===== לוח ודו"ח ===== */
.board-modes { margin: 10px 0 12px; gap: 8px; flex-wrap: nowrap; }
/* מונים, חיפוש, סינון — מרווח אחיד בין השורות ולפני הרשימה */
.board-top { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.board-top .fpanel { gap: 10px; }
.board-modes .seg { min-width: 0; }
.board-modes .seg button { padding: 0 6px; }
.board-modes > .row { flex: none; }
@media (max-width: 360px) { .board-modes .seg svg { display: none; } }
.report-actions { margin-top: 14px; }
/* כוחות ת"פ: כרטיס בסוף לוח הנוכחות, והקצאת משמרת לכוח בשבצ"ק */
.forces-card { width: 100%; margin-top: 12px; font: inherit; color: inherit; text-align: start; cursor: pointer; }
.forces-card .grow { display: flex; flex-direction: column; min-width: 0; }
.forces-card .meta { font-size: 12.5px; color: var(--muted); }
.forces-card > svg { flex: none; color: var(--accent); }
.btn.alloc-on { background: var(--info-soft); color: var(--info); border-color: var(--info); }
.plan-tools { margin: 10px 0; }
.plan-skel { height: 320px; border-radius: var(--r); }
.dot.hatch { background: repeating-linear-gradient(135deg, transparent 0 2px, var(--line-2) 2px 3.5px); border: 1px solid var(--line-2); }
/* פק"לים בבסיס — שורות רגילות (לא דביקות, כדי לא לכסות את הטבלה) */
table.plan .pk-sum { text-align: center; font-variant-numeric: tabular-nums; height: 30px; }
table.plan .pk-sum button { width: 100%; height: 30px; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 650; cursor: pointer; }
table.plan .pk-sum button.zero { color: var(--bad); }
.pk-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--info); }
/* הנקודה היא שכבת רקע, לא ::after ממוקם — אלמנט ממוקם בטבלה נשאר מאחור בגלילה בטלפון (0.87.6). left = סוף השורה ב-RTL */
table.plan .pk-sum button.shared { background: radial-gradient(circle, var(--info) 0 2.5px, transparent 3px) no-repeat top 3px left 3px / 6px 6px; }
table.plan .pk-any .pk-sum, table.plan .pk-any .name { color: var(--muted); }
table.plan .gs-tot .pk-sum, table.plan .gs-tot .name { font-weight: 750; }
/* סה"כ בבסיס בסוף כל מסגרת — קו מעל, כדי שלא ייראה כמו עוד חייל */
table.plan .plat-tot > * { border-top: 2px solid var(--line-2); }
table.plan .pk-sum.short { background: var(--bad-soft); }
table.plan .pk-sum.short button, table.plan .pk-sum.short span { color: var(--bad); font-weight: 750; }
table.plan .pk-cov .pk-sum button { color: var(--ok); }
table.plan .pk-cov .pk-sum.short button { color: var(--bad); }
table.plan tfoot td.sum, table.plan tfoot td.tot, table.plan tfoot th { position: sticky; bottom: 0; background: var(--surface-2); font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; height: 30px; }
table.plan tfoot tr:first-child td, table.plan tfoot tr:first-child th { bottom: 30px; }
table.plan tfoot th.name { z-index: 3; font-size: 12px; }
/* שמות ארוכים בשורות הסיכום (סה"כ, פק"לים, היתרי נהיגה, מינימום, מחלקות בבסיס): נשברים לשורה שנייה במקום להיחתך ב-"…".
   רק השורות האלה — שמות החיילים נשארים שורה אחת, והעמודה לא נרחבת. בזום 100% שתי שורות נכנסות בגובה השורה (--fh); בזום קטן השורה גדלה מעט */
table.plan tr.gs > th.name, table.plan tr.plat > th.name, table.plan tr.pk-any > th.name, table.plan tr.pk-cov > th.name,
table.plan tbody.pk-rows th.name, table.plan tbody.gs-rows th.name, table.plan tfoot th.name {
  white-space: normal; overflow-wrap: break-word; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.15; font-size: max(11px, calc(12px * var(--pz)));
}
.big-pill .pill { font-size: 16px; padding-block: 6px; padding-inline: 14px 12px; }
.big-pill .pill::before { width: 10px; height: 10px; }
.me-tmr { gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
/* שורת שיבוץ: בטלפון השדה יורד לשורה משלו */
@media (max-width: 520px) {
  .item.col-mobile { flex-wrap: wrap; }
  .item.col-mobile .grow { flex-basis: calc(100% - 50px); }
  .item.col-mobile .sm-input { flex: 1; width: auto; }
}

/* ===== ציוד ===== */
.stock-n { font-variant-numeric: tabular-nums; font-size: 15px; white-space: nowrap; }
.stock-n b { font-size: 18px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); font-weight: 600; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* טבלאות סיכום (קשר) */
table.sum { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sum th, table.sum td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.sum th { font-weight: 650; color: var(--muted); font-size: 12.5px; background: var(--surface-2); }
table.sum .n { text-align: center; font-variant-numeric: tabular-nums; }
table.sum td.n + td.n:last-child:not(:empty) { font-weight: 600; }
table.sum tbody tr:last-child td { border-bottom: 0; }
table.sum tfoot td { font-weight: 700; border-top: 1px solid var(--line-2); border-bottom: 0; }
.sig-img { display: block; max-width: 100%; max-height: 160px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; }
.item.ret-row { flex-wrap: wrap; }
.item.ret-row.off > :not(.check-btn) { opacity: .45; }
.check-btn {
  width: 28px; height: 28px; flex: none; border-radius: 8px; border: 2px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; padding: 0; color: var(--accent-ink);
}
.check-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); }
.check-btn svg { width: 16px; height: 16px; }
select.cond { width: auto; min-height: 38px; flex: none; padding: 0 8px; }
.item.issue-line { gap: 8px; flex-wrap: wrap; }
.input.serial { width: 120px; flex: none; min-height: 38px; direction: ltr; text-align: center; }
/* החתמה (0.82.1): שדה צ' לכל הרוחב מתחת לשורה, ורשימה שנפתחת ממנו — "הוספת צ' חדש" בראש, ואחריה הצ' הפנויים */
.issue-line .ser-box { flex: 1 1 100%; position: relative; }
.issue-line .ser-box .input.serial { width: 100%; text-align: start; padding-inline-end: 36px; }
.issue-line .ser-box .input.serial::placeholder { direction: rtl; }
.issue-line .ser-chev { position: absolute; inset-inline-end: 10px; top: 10px; pointer-events: none; color: var(--muted); }
.issue-line .ser-chev svg { width: 18px; height: 18px; display: block; }
.ser-dd {
  margin-top: 4px; max-height: 260px; overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.ser-dd .item.ser-opt { min-height: 42px; padding-block: 8px; padding-inline: 12px; gap: 8px; }
.ser-dd .item.ser-opt[aria-pressed="true"] { background: var(--accent-soft); }
.ser-dd .ser-opt > svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ser-dd .ser-add { font-weight: 700; color: var(--accent); }
.ser-dd .ser-head { padding: 6px 12px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ser-dd .ser-head:first-child { border-top: 0; }
.ser-dd .ser-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.ser-dd .ser-note:first-child { border-top: 0; }
.ser-dd .ser-note svg { width: 16px; height: 16px; flex: none; }
/* שורה שנוספה עכשיו — הבהוב קצר (prefers-reduced-motion עוצר אותו) */
.issue-line.just-added { animation: justadded 1.6s ease-out; }
@keyframes justadded { from { background: var(--accent-soft); } }
.item.count-row { gap: 10px; }
.item.count-ser { flex-wrap: wrap; }
.count-units { flex: 1 1 100%; display: grid; gap: 8px; }
.count-units[hidden] { display: none; }
.count-in { width: 84px; flex: none; text-align: center; min-height: 40px; font-variant-numeric: tabular-nums; }
.gap { min-width: 34px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; flex: none; }
.item.ret-row .grow { flex: 1 1 140px; } /* שורה אחת כשנכנס, אחרת כמות+מצב יורדים לשורה שנייה */
.item.ret-row select.cond { width: 100px; margin-inline-start: auto; }
.item.ret-row select.cond.reason { width: 140px; margin-inline-start: 0; } /* סיבת חסר / פגום (AUDIT R4), אחרי המצב */
/* בדיקה יומית (check.js) */
/* ארבע לשוניות + החתמה בטלפון צר: "החתמה" נשאר אייקון (יש לו aria-label) */
@media (max-width: 420px) { .eq-bar.four [data-act="issue"] span { display: none; } .eq-bar.four [data-act="issue"] { padding-inline: 10px; } }
.ck-modes { margin-bottom: 10px; }
/* ירוק בציוד — סיכום לפי מחלקה (check.js): עמודת המונה שנבחר מודגשת */
.ck-plat td.sel { background: var(--surface-2); font-weight: 700; }
.ck-plat tr.ck-green td { background: var(--ok-soft); }
.ck-green-tag { margin-inline-start: 8px; vertical-align: middle; }
.ck-green-banner { margin-bottom: 8px; }
.ck-fsum { align-items: center; gap: 8px; margin-bottom: 8px; }
.ck-tbar { gap: 8px; margin-bottom: 10px; }
.ck-tbar .datenav { flex: 1 1 260px; }
.item.ck-person { gap: 8px; padding-inline-end: 10px; }
.ck-open { display: flex; align-items: center; gap: 8px; min-width: 0; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; align-self: stretch; }
.item.ck-row { flex-wrap: wrap; gap: 8px; }
.item.ck-row > .grow { flex: 1 1 150px; min-width: 0; }
.ck-cnt { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.ck-cnt .gap { min-width: 30px; }
.seg.ck3 { flex: none; margin-inline-start: auto; }
.seg.ck3 button { padding: 0 10px; min-height: 36px; }
.seg.ck3 button.r-ok[aria-pressed="true"] { background: var(--ok-soft); color: var(--ok); }
.seg.ck3 button.r-bad[aria-pressed="true"] { background: var(--bad-soft); color: var(--bad); }
.seg.ck3 button.r-warn[aria-pressed="true"] { background: var(--warn-soft); color: var(--warn); }
.input.ck-note { flex-basis: 100%; min-height: 38px; }
.ck-h { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 17px; }
.ck-h svg { width: 18px; height: 18px; }
.ammo-card { padding: 12px 14px; display: grid; gap: 10px; margin-bottom: 10px; }

/* ===== ניהול ===== */
.hstat { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); }
.hstat svg { width: 17px; height: 17px; }
.hstat.ok { background: var(--ok-soft); color: var(--ok); }
.hstat.warn { background: var(--warn-soft); color: var(--warn); }
.hstat.bad { background: var(--bad-soft); color: var(--bad); }
.item.list-row { gap: 6px; flex-wrap: wrap; padding-inline: 8px; }
.item.list-row .input.grow { min-width: 120px; min-height: 38px; }
.color-in { width: 38px; height: 38px; padding: 2px; border: 1px solid var(--line-2); border-radius: var(--r-xs); background: var(--surface); flex: none; }
.item.audit { align-items: flex-start; min-height: 0; }
.item.audit .side { font-size: 12px; line-height: 1.35; }
.item.audit .hstat { width: 28px; height: 28px; color: var(--ink-2); }
.item.audit .hstat svg { width: 15px; height: 15px; }
/* יומן: כותרת לכל יום */
.list > .day-h { padding: 7px 14px; background: var(--surface-2); border-top: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.list > .day-h:first-child { border-top: 0; border-radius: var(--r) var(--r) 0 0; }
.list > .day-h + li > .item, .list > .day-h + .item { border-top: 1px solid var(--line); }
/* מצב מערכת: מה שתקין מקופל */
details.okgrp > summary { list-style: none; cursor: pointer; border-bottom: 0; }
details.okgrp > summary::-webkit-details-marker { display: none; }
details.okgrp[open] > summary { border-bottom: 1px solid var(--line); }
details.okgrp > summary .chev { transition: transform .15s; }
details.okgrp[open] > summary .chev { transform: rotate(180deg); }

/* כרטיס עם כותרת ואייקון — חלקים בטופס עריכת חייל ובהגדרות */
.fsec { overflow: hidden; }
.fsec > .card-head { padding: 10px 14px; background: var(--surface-2); }
.fsec > .card-head h3 { font-size: 14px; }
.fsec .sec-ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.fsec .sec-ic svg { width: 15px; height: 15px; }
.fsec .sec-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.fsec > .sec-in { padding: 14px; display: flex; flex-direction: column; gap: 14px; }
.toggles { display: flex; flex-wrap: wrap; gap: 0 18px; }

/* ===== כניסה ===== */
details.paste { text-align: start; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 0 14px; }
details.paste summary { min-height: var(--tap); display: flex; align-items: center; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
details.paste[open] { padding-bottom: 14px; }
details.paste[open] > :not(summary) + * { margin-top: 10px; }
.demo-box { text-align: start; border: 1.5px dashed var(--accent); border-radius: var(--r); padding: 14px; background: var(--accent-soft); }
.demo-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-users .btn { justify-content: flex-start; min-height: 54px; padding: 6px 12px; text-align: start; white-space: normal; }
.demo-users .col { gap: 0; }
.demo-hint { color: var(--info); font-weight: 600; }
.demo-bar { border-radius: 0; justify-content: center; font-size: 12.5px; padding: 6px 14px; }
#pin-pad.busy, #ps-pad.busy { opacity: .5; pointer-events: none; }
.pin-sheet { max-width: 400px; }
.pin-sheet .sheet-body { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
/* הסבר פתיחה */
.onboard .sheet-foot { align-items: center; }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin-top: 16px; }
.ob-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.ob-dots span.on { background: var(--accent); width: 18px; border-radius: 4px; }
.ob-hero { display: flex; justify-content: center; margin: 8px 0 4px; }
.ob-hero svg { width: 64px; height: 64px; color: var(--accent); }
.ob-big { font-size: 18px; line-height: 1.5; font-weight: 600; margin-block: 10px; }
.ob-hand { display: flex; gap: 12px; margin-block: 14px 10px; }
.ob-hand-btn { flex: 1; min-height: 64px; font-size: 20px; font-weight: 700; }
.ob-hand-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
/* ציוד מהבית (homegear.js): כפתור גדול לכל פריט — מסומן = צבע + ✓ */
.gear-opts { margin-block: 10px; }
.gear-btn { width: 100%; min-height: 56px; font-size: 18px; font-weight: 700; justify-content: flex-start; gap: 12px; }
.gear-btn .gear-tick { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: 6px; flex: none; }
.gear-btn .gear-tick svg { visibility: hidden; }
.gear-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gear-btn[aria-pressed="true"] .gear-tick { border-color: currentColor; }
.gear-btn[aria-pressed="true"] .gear-tick svg { visibility: visible; }
.gear-none { margin-block-start: 6px; font-weight: 600; }
.gear-line { justify-content: space-between; }
.gear-fact { display: flex; align-items: center; gap: 6px; }
.onboard.ob-lock .sheet-head .btn { visibility: hidden; }
.ob-item { align-items: flex-start; }
.ob-item > svg { flex: none; margin-top: 2px; color: var(--accent); }

ol.steps { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 10px; }
ol.steps svg { width: 18px; height: 18px; vertical-align: -4px; }
.xfer-box { align-items: center; gap: 8px; text-align: center; }
.code-big { font-size: 28px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

/* ===== שלד: חייל (בלי ניווט) / "שלי" רק בחלון רחב ===== */
.shell.solo .main { padding-bottom: 10px; max-width: 640px; }
.shell.solo .app-ver { padding-bottom: 24px; }
@media (max-width: 899px) { .nav a.wide-only { display: none; } }

/* טבלאות מספרים (דו"ח): מספרים במרכז, עמודה ראשונה בשורה אחת, ובטלפון כותרות נשברות במקום גלילה לצד */
table.data td:first-child { white-space: nowrap; }
table.data.num th:not(:first-child), table.data.num td:not(:first-child) { text-align: center; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  table.data { font-size: 13.5px; }
  table.data th, table.data td { padding: 8px 6px; }
  table.data th:first-child, table.data td:first-child { padding-inline-start: 12px; }
  table.data.num th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
}
.warn-t { color: var(--warn); }
/* הצעת שינוי (skillreq.js): שדה ששונה מהכרטיס */
.field.changed > label::after, .field.changed > .label::after, .toggle.changed::after { content: " · שונה"; color: var(--warn); font-weight: 600; }

/* ---------- כשירות: פק"ל והסמכות ---------- */
select.input.sk-sel { width: auto; max-width: 100%; min-height: 36px; border-radius: 999px; padding: 0 14px; font-weight: 600; flex: none; align-self: flex-start; }
select.input.sk-sel.on { background-color: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.warn:not([aria-pressed="true"]) { border-color: var(--warn); color: var(--warn); }
.chip.add { border-color: var(--accent); color: var(--accent); }
.chip.add svg { width: 15px; height: 15px; }
.chip.miss:not([aria-pressed="true"]) { border-style: dashed; border-color: var(--warn); color: var(--warn); }
.chip.sug { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chip.radio::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; box-sizing: border-box; }
.chip.radio[aria-pressed="true"]::before { border: 4px solid var(--accent); background: var(--bg); }
.item.list-row .mv { display: flex; flex: none; }
.chip.sug[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid-2.cov { align-items: start; }
@media (max-width: 520px) { .grid-2.cov { grid-template-columns: 1fr; } }
.badge svg { width: 13px; height: 13px; }

/* שמירה ברקע: פס דק בראש המסך כל עוד יש כתיבה בדרך (core.js → body.saving) */
body.saving::before {
  content: ''; position: fixed; z-index: 70; top: 0; inset-inline: 0; height: 3px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 40% 100% no-repeat;
  animation: savebar 1.1s linear infinite;
}
@keyframes savebar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
/* שמירה שנמשכת יותר מ-3 שניות (core.js → body.saving-slow): הודעה גלויה, שלא ייראה כאילו כבר נשמר */
body.saving-slow::after {
  content: 'שומר… לא לסגור את האפליקציה'; position: fixed; z-index: 70; top: calc(8px + env(safe-area-inset-top)); inset-inline: 0;
  width: fit-content; margin-inline: auto; padding: 6px 14px; border-radius: 999px; pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: up .2s;
}

/* פחות תנועה (הגדרת המערכת "הפחתת תנועה"): בלי החלקת גיליונות והודעות, רעידת הקוד, ריצוד השלד וגלילה חלקה — כל מצב מופיע מיד.
   הכלל חל על כל אנימציה, גם עתידית. מחווני טעינה (כפתור עסוק, סמל מסתובב) נשארים מסתובבים, לאט: בלי תנועה נראה שהמסך תקוע.
   פס השמירה למעלה הופך לפס קבוע. גלילה חלקה שמבוקשת מהקוד (app.js, show) בודקת את ההגדרה בעצמה. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important;
  }
  .btn:active { transform: none; }
  .btn.busy::after, svg.spin { animation-duration: 2.4s !important; animation-iteration-count: infinite !important; }
  body.saving::before { animation: none; background: var(--accent); opacity: .6; }
}

/* דפדפנים לפני 2023 בלי color-mix: ערכים שם עם var() נפסלים בזמן ריצה ולא נופלים להגדרה הקודמת — לכן גיבוי מפורש */
/* ===== תכנון: גודל הטבלה (--pz על .plan-wrap, 0.5–1.5), ידית גובה, מסך מלא ===== */
.plan-wrap { touch-action: pan-x pan-y; --pz: 1; }
.plan-wrap table.plan { --cw: 34px; --ch: 36px; --cf: 11px; --nmin: 112px; --nmax: 150px; --fh: max(22px, calc(30px * var(--pz))); font-size: max(11px, calc(12px * var(--pz))); }
@media (pointer: coarse) { .plan-wrap table.plan { --cw: 40px; --ch: 42px; --cf: 12px; } }
@media (max-width: 520px) { .plan-wrap table.plan { --nmin: 96px; --nmax: 120px; } }
@media (pointer: fine) { .plan-wrap table.plan.long { --cw: 28px; --cf: 10px; } }
.plan-wrap table.plan .day, .plan-wrap table.plan .cell { width: calc(var(--cw) * var(--pz)); min-width: calc(var(--cw) * var(--pz)); }
.plan-wrap table.plan .day { height: calc(40px * var(--pz)); font-size: max(11px, calc(12px * var(--pz))); }
.plan-wrap table.plan .day .d { font-size: max(11px, calc(11.5px * var(--pz))); }
.plan-wrap table.plan .cell, .plan-wrap table.plan .cell button { height: calc(var(--ch) * var(--pz)); }
.plan-wrap table.plan .cell button { font-size: max(11px, calc(var(--cf) * var(--pz))); }
.plan-wrap table.plan .name { min-width: calc(var(--nmin) * var(--pz)); max-width: calc(var(--nmax) * var(--pz)); padding: 0 calc(10px * var(--pz)); font-size: max(11px, calc(13px * var(--pz))); }
.plan-wrap table.plan .plat td { font-size: max(11px, calc(12px * var(--pz))); }
.plan-wrap table.plan .tot { min-width: calc(44px * var(--pz)); }
.plan-wrap table.plan thead .tot { font-size: max(11px, calc(11px * var(--pz))); }
.plan-wrap table.plan .pk-sum, .plan-wrap table.plan .pk-sum button, .plan-wrap table.plan tfoot td.sum, .plan-wrap table.plan tfoot td.tot, .plan-wrap table.plan tfoot th { height: var(--fh); }
.plan-wrap table.plan tfoot tr:first-child td, .plan-wrap table.plan tfoot tr:first-child th { bottom: var(--fh); }
/* תצוגת סבב מחלקתי (rotations.js): שורת סיכום אחת — בתחתית, לא מעל שורה אחרונה */
.plan-wrap table.rotprev tfoot tr:first-child td, .plan-wrap table.rotprev tfoot tr:first-child th { bottom: 0; }
/* מרווחים בתצוגת סבב מחלקתי (בגיליון, לא ב-.main — שם vstack לא מרווח) */
.rp-sheet .vstack > :not(:first-child) { margin-top: 12px; }
.rp-sheet .vstack > .rp-wrap + p { margin-top: 6px; }
.rp-lv > :not(:first-child) { margin-top: 10px; }
/* תכנון קבוצות: שורת "בקשות יציאה" מתחת לכל קבוצה — נמוכה, כמו שורת סיכום */
.plan-wrap table.rotprev tr.gp-lv td, .plan-wrap table.rotprev tr.gp-lv th { height: var(--fh); }
.rp-lv > h3 + p { margin-top: 2px; }
.rp-rec { display: block; }
.rp-rec + .rp-rec { margin-top: 4px; }
.rp-rec + .rp-rec.rp-rec-sum { margin-top: 12px; }
.plan-wrap table.plan .nshort { display: none; }
.plan-wrap.z-sm table.plan .nfull { display: none; }
/* סבב נעול (0.105.2): המנעול צמוד לקצה התא שליד הימים, באמצע הגובה, באותו טור בכל השורות; לשם נשמר מקום כדי ש"…" לא ייגע בו */
.plan-wrap table.plan th.name.rl { padding-inline-end: 24px; }
table.plan th.name .rlock { position: absolute; inset-inline-end: 7px; top: 50%; transform: translateY(-50%); display: flex; color: var(--warn); }
table.plan th.name .rlock svg { width: 13px; height: 13px; }
.leg-lock { display: inline-flex; vertical-align: middle; color: var(--warn); margin-inline-end: 4px; }
.leg-lock svg { width: 12px; height: 12px; }
.plan-wrap.z-sm table.plan .nshort { display: inline; }
.plan-wrap.z-sm table.plan .name { min-width: 64px; max-width: 84px; padding: 0 5px; }
.plan-wrap.z-sm table.plan .cell button { font-size: 12px; }
.plan-zoom { gap: 6px; align-items: center; }
/* 0.92.2: מה שעוד יחרוג נחתך בתוך המסך ולא מותח את הדף (בטלפון עם גופן גדול הסרגל התחתון נחתך). clip לא יוצר גלילה, אז sticky עובד */
.main[data-route="plan"] { overflow-x: clip; }
.plan-zoom .pct { min-width: 52px; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
.plan-zoom .btn:disabled { opacity: .4; }
.plan-zoom .btn[hidden] { display: none; }
/* מסך מלא (בדיקת UX 0.92.2): בשורה רק הגודל ו"יציאה ממסך מלא" — "עוד" לא נחוץ כדי לצאת, ובטלפון צר הוא נדחק אל מחוץ למסך.
   ואם עדיין צר (גופן גדול) — השורה נשברת לשתיים במקום להיחתך */
.plan-zoom { flex-wrap: wrap; }
.plan-root.fs .plan-zoom [data-act="pmore"] { display: none; }
.plan-grip { display: flex; align-items: center; justify-content: center; height: 32px; cursor: ns-resize; touch-action: none; border-radius: var(--r-xs); }
.plan-grip::before { content: ""; width: 56px; height: 5px; border-radius: 3px; background: var(--line-2); }
.plan-grip:hover::before, .plan-grip:focus-visible::before { background: var(--muted); }
.main[data-route="plan"] .plan-root.fs .plan-top { display: none; }

/* G7: על מסך מגע כל אזור לחיצה לפחות 44px. הכלל בא אחרי הכללים הרגילים כדי שידרוס אותם (באותה עוצמה) */
@media (pointer: coarse) {
  .btn.sm { min-height: var(--tap); }
  .btn.sm.icon { width: var(--tap); }
  .toast .btn { min-height: var(--tap); }
  .chip, .seg button { min-height: var(--tap); }
  .stepper button { width: var(--tap); height: var(--tap); }
  .stepper input { height: var(--tap); }
}
/* לוח מחלקה (platboard.js, 0.50.0) */
.pb-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.pb-title { margin: 0; font-size: 1.25rem; }
.pb-count { margin-inline-start: auto; padding: 2px 10px; border-radius: var(--r-sm); background: var(--surface-3); color: var(--ink); font-weight: 600; font-size: 13px; }
.pb-grid { display: grid; gap: 10px; grid-template-columns: 1fr; margin-top: 8px; }
.pb-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; min-width: 0; }
.pb-box h3 { margin: 0 0 6px; font-size: 1rem; text-align: center; }
.pb-box.free.target { border-color: var(--accent); border-style: dashed; cursor: pointer; }
/* כיתה = שורות של 4 (8 משבצות = 2 שורות, בקשת המשתמש) — בלוח ובעריכת התקן */
.pb-slots { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pb-slot { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 52px; padding: 6px 8px; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--info-soft); color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.pb-slot .r { font-size: 12px; }
.pb-slot .pb-t { text-decoration: underline dotted; text-underline-offset: 3px; }   /* כותרת בלוח (0.68.0) — שונה מהתפקיד */
.pb-slot .n { font-weight: 600; overflow-wrap: anywhere; }
.pb-slot.empty { background: var(--surface); border-style: dashed; }
.pb-slot.over { background: var(--warn-soft); }
.pb-slot[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: 1px; }
/* לרוחב תמיד: שתי כיתות בשורה. טלפון לאורך — "סובבו את הטלפון" במקום הלוח (בקשת המשתמש) */
.pb-rotate { display: none; }
@media (min-width: 600px) { .pb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pb-box.hq { grid-column: 1 / -1; } }
@media (orientation: portrait) and (max-width: 599px) {
  .pb-rotate { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40vh; text-align: center; font-weight: 600; }
  .pb > .pb-grid { display: none; }
}
.pb-ehead { display: flex; align-items: center; gap: 6px; }
.pb-ehead h3 { margin: 0; }
.pb-eins { gap: 6px; margin: 4px 0 8px; }
.pb-eins label { font-size: 12px; min-width: 120px; }
.pb-etile { position: relative; min-width: 0; }
.pb-etile .pb-ecombo { width: 100%; min-height: 52px; padding-inline: 16px 2px; background: var(--info-soft); font-size: 13px; }
.pb-etile .pb-ecombo svg { display: none; }
.pb-etile.open .pb-ecombo { background: var(--surface); border-style: dashed; }
.pb-enum { position: absolute; inset-inline-start: 6px; top: 4px; font-size: 12px; font-weight: 700; color: var(--ink); z-index: 1; pointer-events: none; }
.pb-x { position: absolute; inset-inline-end: -6px; top: -6px; width: 22px; height: 22px; padding: 0; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; z-index: 1; }
.pb-x svg { width: 12px; height: 12px; }
.pb-add { align-items: center; justify-content: center; flex-direction: row; }

@supports not (color: color-mix(in srgb, red 50%, blue)) {
  .topbar { background: var(--bg); }
  .btn.danger { border-color: var(--line); }
  .pill { background: var(--surface); color: var(--c); }
  .input:focus { outline: 2px solid var(--accent); }
  .status-btn { border: 1.5px solid var(--line); background: var(--surface); }
  .toast .btn { border-color: transparent; }
  table.plan .cell button.none { background: var(--lvm) no-repeat top 1px right 1px / 11px 11px, repeating-linear-gradient(135deg, transparent 0 5px, var(--line) 5px 6px); }
  table.plan .cell.today button { box-shadow: inset 0 0 0 1px var(--accent); }
}

/* 0.20.0 — אירוע (גיוס/שחרור) בעריכת רשימת הסטטוסים; גיליון "מחר: גיוס ושחרור" */
.item.list-row .list-ev { flex-basis: 100%; padding-inline-start: 84px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 520px) { .item.list-row .list-ev { padding-inline-start: 4px; } }
.item.cu-row { align-items: flex-start; }
.item.cu-row .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item.cu-row > .btn, .item.cu-row > .badge, .item.cu-row > svg { flex: none; align-self: center; }

/* ===== A1: שיבוץ על משמרת (missions.js) ===== */
.shift-head .grow { flex: 1; }
.shift-assign { padding: 4px 14px 12px; display: flex; }
.item.dim .main-line { color: var(--muted); }
.item .badge { white-space: normal; text-align: end; }

/* ===== B2: הזנה מהירה בלוח (board.js) — צבע משלו, כדי שלא יתבלבלו עם גלישה רגילה ===== */
.brush-panel { display: flex; flex-direction: column; gap: 10px; padding: 12px; margin-bottom: 12px; border: 2px solid var(--brush); border-radius: var(--r); background: var(--brush-soft); }
.brush-panel .bold svg { width: 18px; height: 18px; vertical-align: -3px; color: var(--brush); }
.brush-row { padding: 0; align-items: stretch; }
.brush-row.staged { background: var(--brush-soft); box-shadow: inset 4px 0 0 var(--brush); }
.stage-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 56px;
  background: none; border: 0; text-align: start; color: inherit; font: inherit;
}
.brush-row .btn.icon { align-self: center; margin-inline-end: 8px; }
.pill.ghost-pill { background: transparent; border: 2px dashed var(--brush); color: var(--ink); }
.bar-pad { height: 76px; }
.brushbar {
  position: fixed; z-index: 35; inset-inline: 12px; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 8px;
  padding: 8px; padding-inline-start: 14px; border-radius: 16px; background: var(--brush); color: #fff; box-shadow: var(--shadow-lg); animation: up .2s;
  max-width: 620px; margin: 0 auto; font-size: 14px;
}
.brushbar .btn.primary { background: #fff; border-color: #fff; color: var(--brush); }
.brushbar .btn.ghost { color: #fff; }
.brushbar .btn[disabled] { opacity: .55; }
@media (min-width: 900px) { .brushbar { bottom: 20px; inset-inline-start: 240px; } }

/* ===== חירום (emergency.js, 0.26.0) ===== */
.em-banner .btn { flex: none; }
.nav a.em-nav { color: var(--bad); }
/* החזקה לפתיחה / סגירה: הפס מתמלא בשתי שניות; עזיבה מוקדמת מאפסת */
.btn.hold { position: relative; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; min-height: 52px; }
.hold-fill { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: rgba(0, 0, 0, .28); transition: width .15s; pointer-events: none; }
.btn.hold.holding .hold-fill { width: 100%; transition: width 2s linear; }
.hold-l { position: relative; display: inline-flex; align-items: center; gap: 8px; }
.list-foot .btn.hold { flex-basis: 100%; }
.em-event .em-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bad-solid); flex: none; }
.em-me { min-height: 64px; font-size: 18px; font-weight: 750; background: var(--ok); color: var(--bg); border-color: var(--ok); }
.em-me.on { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.em-search { margin-block: 10px; }
.em-kpis { margin-block-end: 10px; }
.em-row { gap: 6px; padding-inline: 10px; }
.em-row.ok { background: var(--ok-soft); }
/* סימון "בסדר": ירוק מתמלא מצד לצד לפני שהשורה יורדת לסוף (ב-reduced motion — מלא מייד) */
.em-row.done { background: linear-gradient(var(--ok-soft), var(--ok-soft)) no-repeat 100% 0 / 100% 100%; animation: em-done .5s ease-out both; pointer-events: none; }
.em-row.done .em-chk { background: var(--ok); border-color: var(--ok); color: var(--bg); }
@keyframes em-done { from { background-size: 0 100%; } to { background-size: 100% 100%; } }
.em-who { display: flex; flex-direction: column; min-width: 0; color: inherit; text-decoration: none; }
.em-who .meta { display: block; }
.em-who .meta.bad-t { color: var(--bad); }
.em-call { color: var(--accent); }
.em-chk { border-radius: 50%; color: var(--muted); }
.em-chk[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.em-past summary { list-style: none; cursor: pointer; }
.em-past summary::-webkit-details-marker { display: none; }
.em-past details[open] summary svg:last-child { transform: rotate(180deg); }
.em-marks { padding: 4px 14px 12px; }
.em-marks li { padding-block: 3px; }

/* ===== 0.28.0 (U2/U6): "שלי" = חשבון; "עוד" רק בטלפון (בחלון רחב כל המסכים בצד) ===== */
@media (min-width: 900px) { .phone-only { display: none !important; } }
@media (max-width: 899px) { .nav a.cur-more { color: var(--accent); } }
.ob-group { font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
.ob-group:first-child { margin-top: 0; }
ul.ob-help { margin: 6px 0 0; padding-inline-start: 18px; display: grid; gap: 4px; }

/* ===== 0.28.6: משיכה מעבר לתחתית (app.js pullPeek) — המסך עולה ומציג את הגרסה, וקופץ חזרה ===== */
/* transform רק בזמן המשיכה והקפיצה: transform קבוע היה הופך פסים קבועים (position: fixed) בתוך המסך ליחסיים אליו */
.content.pull > .main, .content.pull > .app-ver { transform: translateY(calc(var(--pull, 0) * -1px)); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1); }
.content.pulling > .main, .content.pulling > .app-ver { transition: none; }

/* ===== 0.28.7: טווח התאריכים בתכנון — מתכווץ ונשבר לשתי שורות (סבב / תאריכים) במקום לגלוש על החיצים ===== */
.plan-tools .datebtn { min-width: 0; height: auto; min-height: 44px; padding-block: 4px; }
.rng { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; line-height: 1.25; }
.rng > * { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rng-c { font-size: 13px; }
.rng-d { font-size: 12.5px; letter-spacing: -.01em; }
.plan-tools [data-act="prev"], .plan-tools [data-act="next"] { padding-inline: 10px; }
.plan-tools .datebtn { padding-inline: 4px; }

/* ויסות צלם (0.81.0): תאי המסגרות בשורה */
.al-cells { gap: 4px; margin-block-start: 4px; }
/* "לפי חייל" (0.102.0): שורת הסה"כ צמודה לכותרת המחלקה שמעליה */
.main .vstack > .al-sum { margin-top: 6px; align-items: center; }
.al-mk { margin-block-start: 6px; }
/* עריכת שורה (0.95.0): מסגרת ← תא */
.al-edit-row { gap: 12px; }
.al-edit-row label { flex: 1; min-width: 0; }
.al-edit-in { flex: 0 0 140px; width: 140px; }

/* "עוד" (טלפון, 0.91.0): שאר המסכים ככרטיסים לבחירה */
.more-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 12px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; }
.more-tile svg { width: 26px; height: 26px; color: var(--accent); }
.more-tile.bad-t svg, .more-tile.bad-t .mt-l { color: var(--bad); }
.more-tile .mt-n { font-size: 12px; font-weight: 400; color: var(--warn); }

/* בקשות יציאה ב"פלוגה" (0.92.2): כותרת אחת שמתכווצת */
/* נראית כמו כל כותרת אחרת: הכותרת ממלאת את השורה, הכפתור בקצה; רק חץ קטן ואפור מסמן שאפשר לפתוח */
.fold-head { flex: 1; display: flex; align-items: center; gap: 8px; align-self: stretch; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.section-title .fold-head h2 { flex: 0 1 auto; }
.fold-head .chev { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.lv-fold.open .fold-head .chev { transform: rotate(180deg); }
.lv-fold:not(.open) .lv-body { display: none; }
.lv-body h3 { font-size: 14px; color: var(--ink-2); }
