/* =====================================================================
   מערכת מצלמות — עיצוב
   מבנה הממשק בהשראת מקאנו: כותרת לבנה, פס תפריט כהה עם לשוניות,
   שורת סמלים לתת-עמודים, טבלאות נקיות, כפתורי גלולה ופוטר כהה.
   הצבעים, הגופן (Assistant) וסולם הגדלים מה-CRM של חזון דב.

   עיקרון: שום דבר לא זז במעבר בין מסכים. כל הפסים והתוכן יושבים
   באותו טור (.wrap), הכותרת של כל עמוד באותו גובה, ומשקל הגופן
   של פריט נבחר זהה לזה של פריט רגיל (רק הצבע משתנה).
   ===================================================================== */

/* הגופן של ה-CRM, שמור בתוך האתר (אין פנייה ל-Google בזמן הגלישה) */
@font-face {
  font-family: 'Assistant'; font-style: normal; font-weight: 200 800; font-display: block;
  src: url(fonts/assistant-hebrew.woff2) format('woff2');
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: 'Assistant'; font-style: normal; font-weight: 200 800; font-display: block;
  src: url(fonts/assistant-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* ירוק (CRM) */
  --green-50: #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --primary-grad: linear-gradient(135deg, #22c55e, #16a34a);
  --primary-glow: 0 2px 6px rgba(34,197,94,.30);
  --primary-glow-h: 0 4px 12px rgba(34,197,94,.45);
  --focus-ring: 0 0 0 3px rgba(34,197,94,.18);

  /* ניטרליים (CRM) */
  --stone-50: #e6ecf3;
  --stone-100: #e4eaf1;
  --stone-200: #d3dbe5;
  --stone-300: #b6c1cf;
  --stone-400: #93a1b5;
  --stone-500: #5b6b80;
  --stone-600: #475569;
  --stone-700: #2e3a4a;
  --stone-900: #0e1722;
  --bg: #f6f8fb;
  --card: #ffffff;
  --row-head: #f4f6f9;
  --line: #e3e8ef;

  /* משמעות */
  --danger: #ef4444; --danger-700: #b91c1c; --danger-bg: #fef2f2; --danger-bd: #fecaca;
  --amber-bg: #fef9ec; --amber-tx: #b45309;

  /* פס התפריט והפוטר */
  --bar: #2e3a4a;
  --bar-2: #3a4759;

  --r-sm: 8px; --r-md: 10px; --r-lg: 14px; --r-pill: 999px;
  --shadow-card: 0 1px 2px rgba(14,23,34,.04);
  --shadow-raised: 0 1px 3px rgba(14,23,34,.06), 0 4px 12px -4px rgba(14,23,34,.08);
  --shadow-modal: 0 12px 40px rgba(14,23,34,.18);
  --ease: cubic-bezier(.22,.61,.36,1);

  /* הטור שבו יושב הכול */
  --page-w: 1400px;
  --gutter: 28px;

  --font: 'Assistant', 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }   /* מקום קבוע לפס הגלילה, כדי שהעמוד לא יזוז כשהוא מופיע */
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--stone-700);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
#app, .page { min-height: 100vh; display: flex; flex-direction: column; }
.page { flex: 1; }
.wrap { width: 100%; max-width: var(--page-w); margin-inline: auto; padding-inline: var(--gutter); }
a { color: var(--green-700); }
h1, h2, h3 { color: var(--stone-900); margin: 0; }
p { margin: 0 0 12px; }
.muted { color: var(--stone-500); }
.hidden { display: none !important; }
/* כניסה בשני שלבים וקודי חירום */
.code-input { font-size: 20px; letter-spacing: 4px; text-align: center; font-variant-numeric: tabular-nums; }
.code-note { margin: 0 0 12px; font-size: 14.5px; line-height: 1.6; }
.code-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; }
button.linklike { background: none; border: 0; padding: 4px 0; height: auto; min-height: 0; color: var(--green-700, #15803d); font-size: 14px; text-decoration: underline; box-shadow: none; cursor: pointer; }
button.linklike:disabled { color: var(--stone-400, #999); text-decoration: none; cursor: default; }
.codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 28px; margin: 10px 0 12px; }
.codes code { font-family: Consolas, "Courier New", monospace; font-size: 16px; letter-spacing: 1px; }
.card h3 .badge, .card h4 .badge { margin-inline-start: 8px; vertical-align: middle; }
.card h4 { margin: 22px 0 8px; font-size: 15.5px; padding-top: 14px; border-top: 1px solid var(--stone-200, #e5e7eb); }
.ltr { direction: ltr; text-align: left; }
.num { direction: ltr; unicode-bidi: isolate; display: inline-block; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.push { margin-inline-start: auto; }
.full { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.label-sm { font-size: 13px; font-weight: 600; color: var(--stone-700); margin: 16px 0 6px; }

/* סמלים (Lucide) */
.ico { display: inline-flex; flex: none; width: 18px; height: 18px; line-height: 0; }
.ico svg { width: 100%; height: 100%; }
.ico.flip { transform: scaleX(-1); }

/* טעינה: מופיעה רק אם הנתונים מתעכבים, כדי שלא יהיה הבהוב במעבר רגיל */
.loading { display: grid; place-items: center; min-height: 220px; opacity: 0; animation: appear .2s .4s forwards; }
@keyframes appear { to { opacity: 1; } }
.spinner { width: 26px; height: 26px; border: 3px solid var(--stone-200); border-top-color: var(--green-500); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- כפתורים (גלולה, כמו במקאנו) ---------- */
button {
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2; color: var(--stone-700); background: #fff;
  border: 1px solid var(--stone-300); border-radius: var(--r-pill);
  padding: 0 18px; height: 38px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: background .13s, border-color .13s, box-shadow .13s, color .13s;
}
button:hover { border-color: var(--green-300); background: var(--green-50); color: var(--green-700); }
button:focus-visible { outline: none; box-shadow: var(--focus-ring); border-color: var(--green-500); }
button.primary { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: var(--primary-glow); }
button.primary:hover { box-shadow: var(--primary-glow-h); color: #fff; filter: brightness(1.03); }
button.danger { color: var(--danger-700); border-color: var(--danger-bd); }
button.danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger-700); }
button.small { padding: 0 13px; height: 30px; font-size: 13px; gap: 5px; }
button.small .ico { width: 15px; height: 15px; }
button.ghost { background: transparent; border-color: transparent; }
button:disabled { opacity: .45; cursor: default; pointer-events: none; }

/* ---------- טפסים ---------- */
input, select, textarea {
  font: inherit; font-size: 14.5px; color: var(--stone-900); background: #fff;
  border: 1px solid var(--stone-300); border-radius: var(--r-sm);
  padding: 0 11px; width: 100%; height: 40px;
  transition: border-color .13s, box-shadow .13s;
}
input::placeholder { color: var(--stone-400); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-500); box-shadow: var(--focus-ring); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--green-600); flex: none; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--stone-700); margin-bottom: 5px; }
label.check { display: flex; align-items: center; gap: 9px; margin: 8px 0; cursor: pointer; }
.hint { font-size: 13px; color: var(--stone-500); margin: 5px 0 0; }
.hint.top { margin: -4px 0 14px; }
.error { color: var(--danger-700); min-height: 22px; font-size: 13.5px; margin: 4px 0; }
.search { position: relative; }
.search input { border-radius: var(--r-pill); padding-inline-start: 38px; }
.search .ico { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--stone-400); pointer-events: none; }

/* ---------- כניסה (CRM) ---------- */
body:has(.login-wrap) { background: var(--stone-50); }   /* כולל הרצועה השמורה לפס הגלילה */
.login-wrap { flex: 1; min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--stone-50); }
.login-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06); padding: 40px 40px 36px;
}
.login-card .logo { width: 52px; height: 52px; margin: 0 auto 14px; display: block; }
.login-card h1 { font-size: 24px; font-weight: 700; line-height: 1.3; color: var(--green-700); text-align: center; }
.login-card .sub { margin: 2px 0 26px; text-align: center; color: var(--stone-500); }
.login-card .error { min-height: 20px; margin: 0 0 6px; }
.login-card button { width: 100%; height: 44px; border-radius: var(--r-md); font-size: 15px; }
@media (max-width: 480px) { .login-card { padding: 30px 22px 26px; } }

/* ---------- כותרת עליונה (לבנה) ---------- */
.hdr { background: #fff; padding-top: env(safe-area-inset-top); }
.hdr .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.brand b { font-size: 21px; font-weight: 700; line-height: 1; color: var(--stone-900); }
.userbox { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--green-100); color: var(--green-700); font-weight: 700; font-size: 14px; line-height: 1;
}
.userbox .who { display: flex; flex-direction: column; line-height: 1.25; }
.userbox .who b { color: var(--stone-900); font-size: 14.5px; font-weight: 600; }
.userbox .who small { color: var(--stone-500); font-size: 12.5px; }
.userbox .logout { margin-inline-start: 10px; padding: 0 12px; height: 34px; color: var(--stone-600); border-color: var(--line); }
.userbox .logout .ico { width: 16px; height: 16px; }

/* ---------- פס תפריט כהה עם לשוניות ---------- */
.mainnav { background: var(--bar); }
.mainnav .wrap { display: flex; height: 44px; overflow-x: auto; scrollbar-width: none; }
.mainnav .wrap::-webkit-scrollbar { display: none; }
.mainnav a {
  display: flex; align-items: center; color: #dfe6ee; text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 0 24px; white-space: nowrap; transition: background .13s, color .13s;
}
.mainnav a:hover { background: var(--bar-2); color: #fff; }
.mainnav a.active { background: #fff; color: var(--stone-900); }

/* ---------- שורת סמלים (תת-עמודים) ---------- */
.subnav { background: #fff; box-shadow: inset 0 -1px 0 var(--line); }
.subnav .wrap { display: flex; overflow-x: auto; scrollbar-width: none; }
.subnav .wrap::-webkit-scrollbar { display: none; }
.subnav a {
  display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; width: 112px;
  padding: 11px 4px 9px; color: var(--stone-600); text-decoration: none; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; transition: color .13s, box-shadow .13s;
}
.subnav a .ico { width: 24px; height: 24px; color: var(--stone-400); transition: color .13s; }
.subnav a .ico svg { stroke-width: 1.75; }
.subnav a:hover { color: var(--stone-900); }
.subnav a:hover .ico { color: var(--stone-600); }
.subnav a.active { color: var(--stone-900); box-shadow: inset 0 -3px 0 var(--green-600); }
.subnav a.active .ico { color: var(--green-600); }

/* ---------- אזור התוכן ---------- */
.content { flex: 1; padding: 22px 0 36px; }
.content.narrow .wrap > * { max-width: 520px; }

/* כותרת עמוד: גובה קבוע, כדי שהיא תשב באותו מקום בכל המסכים */
.page-title { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; min-height: 40px; margin: 0 0 18px; }
.page-title h2 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.page-title .count { font-size: 14px; color: var(--stone-500); }
.page-title .actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead { color: var(--stone-500); font-size: 14.5px; margin: -6px 0 16px; max-width: 820px; }

/* לשוניות פנימיות (קו תחתון) */
.tabs { display: flex; gap: 22px; box-shadow: inset 0 -1px 0 var(--line); margin: 0 0 18px; overflow: auto hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  border: 0; border-radius: 0; background: transparent; color: var(--stone-500); font-weight: 600; font-size: 14.5px;
  padding: 0 2px; height: 40px; flex: none; box-shadow: inset 0 -2px 0 transparent;
}
.tabs button:hover { background: transparent; color: var(--stone-900); }
.tabs button.on { color: var(--stone-900); box-shadow: inset 0 -2px 0 var(--green-600); }
.tabs button .n { font-size: 12.5px; font-weight: 600; color: var(--stone-500); background: var(--stone-100); border-radius: var(--r-pill); padding: 1px 8px; }

/* ---------- צפייה במצלמות ---------- */
.filters { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin: 0 0 16px; }
.filters .search { margin-inline-start: auto; width: 240px; }
.filters .search input { height: 36px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { height: 36px; padding: 0 14px; border-color: var(--line); color: var(--stone-600); }
.chips button .n { font-size: 12.5px; font-weight: 600; color: var(--stone-500); background: var(--stone-100); border-radius: var(--r-pill); padding: 1px 8px; }
.chips button:hover { background: #fff; border-color: var(--stone-300); color: var(--stone-900); }
.chips button.on { background: var(--green-50); border-color: var(--green-300); color: var(--green-700); }
.chips button.on .n { background: var(--green-100); color: var(--green-700); }
.seg { display: inline-flex; background: var(--stone-100); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; width: 36px; height: 30px; padding: 0; color: var(--stone-600); }
.seg button:hover { background: #fff; color: var(--stone-900); }
.seg button.on { background: #fff; color: var(--green-700); box-shadow: 0 1px 4px rgba(14,23,34,.14); }
.seg-label { color: var(--stone-500); font-size: 13.5px; }
.cams { display: grid; gap: 12px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.site-title {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 12px 0 0;
  font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--stone-900);
}
.site-title::before { content: ''; width: 4px; height: 18px; border-radius: 2px; background: var(--green-500); }
.site-title:first-child { margin-top: 0; }
.site-title .n { font-size: 13px; font-weight: 400; color: var(--stone-500); }
.tile {
  position: relative; background: #0e1722; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16 / 9;
  cursor: pointer; box-shadow: var(--shadow-card); outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color .13s, box-shadow .13s;
}
.tile:hover { outline-color: var(--green-300); box-shadow: var(--shadow-raised); }
.tile video { width: 100%; height: 100%; object-fit: contain; display: block; background: #0e1722; }
.tile .label {
  position: absolute; inset-inline: 0; top: 0; padding: 8px 12px 18px;
  font-size: 13.5px; font-weight: 600; line-height: 1.3; color: #fff; pointer-events: none;
  background: linear-gradient(rgba(14,23,34,.78), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tile .state {
  position: absolute; inset: 0; display: grid; place-items: center; color: var(--stone-300); font-size: 13.5px; line-height: 1.5;
  pointer-events: none; text-align: center; padding: 10px;
}
.tile .state small, .pbplayer .state small { color: var(--stone-400); font-size: 12.5px; }
.connecting { display: grid; justify-items: center; gap: 8px; }
.tile .spinner, .viewer .spinner, .pbplayer .spinner { border-color: rgba(255,255,255,.15); border-top-color: var(--green-500); }

/* ---------- צפייה במסך מלא ---------- */
.viewer { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
.viewer .vbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 16px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--bar); color: #fff; min-height: 52px;
}
.viewer .vbar .title { margin-inline-end: auto; font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer .vbar button { background: transparent; color: #e6ecf3; border-color: rgba(255,255,255,.28); }
.viewer .vbar button:hover { background: var(--bar-2); border-color: rgba(255,255,255,.5); color: #fff; }
.viewer .vbody { flex: 1; position: relative; min-height: 0; }
.viewer video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.viewer .state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--stone-300); pointer-events: none; text-align: center; }

/* ---------- כרטיסים וטבלאות ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card); padding: 20px; margin-bottom: 14px;
}
.card.flush { padding: 0; overflow: hidden; }
.card.note { color: var(--stone-500); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: start; padding: 0 16px; height: 52px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list th { height: 42px; background: var(--row-head); color: var(--stone-500); font-weight: 600; font-size: 13px; white-space: nowrap; }
table.list td { font-size: 14.5px; }
table.list tbody tr { transition: background .13s; }
table.list tbody tr:hover { background: #f7fbf8; }
table.list tr:last-child td { border-bottom: 0; }
table.list td b { color: var(--stone-900); font-weight: 600; }
table.list th:last-child, table.list td.actions { width: 1%; white-space: nowrap; text-align: end; }
table.list td.actions button { vertical-align: middle; }
table.list td.actions button + button { margin-inline-start: 6px; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.5; padding: 1px 10px; border-radius: var(--r-pill); background: var(--stone-100); color: var(--stone-600); white-space: nowrap; }
.badge.ok { background: var(--green-100); color: var(--green-700); }
.badge.bad { background: var(--danger-bg); color: var(--danger-700); }
.badge.admin { background: var(--amber-bg); color: var(--amber-tx); }
.extra { margin-inline-start: 6px; color: var(--stone-500); font-size: 13px; }

/* ---------- חלון (מודאל) ---------- */
.modal-back { position: fixed; inset: 0; z-index: 60; background: rgba(14,23,34,.45); display: grid; place-items: center; padding: 14px; animation: fade .2s var(--ease); }
.modal {
  background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-modal); width: 100%; max-width: 640px;
  max-height: calc(100vh - 28px); display: flex; flex-direction: column; animation: rise .28s var(--ease);
}
.modal header { padding: 16px 22px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; line-height: 1.4; color: var(--stone-900); }
.modal .body { padding: 20px 22px; overflow-y: auto; }
.modal footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-start; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.camlist { border: 1px solid var(--line); border-radius: var(--r-md); max-height: 280px; overflow-y: auto; padding: 6px 14px 10px; background: #fff; }
.camlist .grp { font-size: 13px; font-weight: 700; color: var(--stone-900); margin: 12px 0 2px; display: flex; justify-content: space-between; }
.camlist .grp a { font-weight: 600; }
.camlist label.check { margin: 5px 0; }
.test-out > div { margin: 4px 0; }

/* ---------- פוטר כהה ---------- */
.foot { background: var(--bar); color: #aeb9c7; font-size: 13px; padding-bottom: env(safe-area-inset-bottom); }
.foot .wrap { display: flex; align-items: center; gap: 16px; height: 38px; }

#toast {
  position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%) translateY(30px);
  background: var(--stone-900); color: #fff; padding: 10px 18px; border-radius: var(--r-md); font-weight: 600;
  box-shadow: var(--shadow-modal); opacity: 0; transition: .25s var(--ease); z-index: 100; pointer-events: none; max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger-700); }
.empty { text-align: center; padding: 56px 10px; color: var(--stone-500); }
.empty .ico { width: 44px; height: 44px; color: var(--stone-300); margin-bottom: 10px; }
.empty .ico svg { stroke-width: 1.5; }

/* ---------- הקלטות ---------- */
.pb-pick { display: flex; align-items: center; gap: 8px; margin: 0; }
.pb-pick select { width: 250px; }
.pb-pick input[type=date] { width: 158px; }
.pb-pick input[type=time] { width: 128px; }
.pb-pick select, .pb-pick input, .pb-pick button { height: 38px; }
.pbplayer {
  position: relative; aspect-ratio: 16 / 9; max-height: max(260px, calc(100vh - 350px)); width: 100%;
  background: #0e1722; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow-raised);
}
.pbplayer video { width: 100%; height: 100%; object-fit: contain; display: block; background: #0e1722; }
.pbplayer:fullscreen { border-radius: 0; max-height: none; }
.pbplayer .state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--stone-300); pointer-events: none; text-align: center; }
.pbidle { display: grid; justify-items: center; gap: 12px; color: var(--stone-400); font-size: 14.5px; padding: 16px; }
.pbidle .ico { width: 40px; height: 40px; color: #4b5b70; }
.pbidle .ico svg { stroke-width: 1.5; }
.pbmsg {
  position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 12px;
  background: rgba(14,23,34,.82); color: #e6ecf3; text-align: center; padding: 20px; font-size: 15px;
}
.pbmsg.on { display: grid; }
.pbmsg button { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.pbmsg button:hover { background: var(--bar-2); border-color: rgba(255,255,255,.55); color: #fff; }
/* ציר הזמן: מוקדם משמאל, מאוחר מימין, כמו בנגני וידאו */
.pbbar { direction: ltr; display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 12px 0 8px; }
.pbbar button { direction: rtl; min-width: 78px; }
.pbpos {
  direction: ltr; min-width: 186px; height: 34px; display: grid; place-items: center; margin: 0 4px;
  font-weight: 700; font-size: 15px; color: var(--stone-900); font-variant-numeric: tabular-nums;
  background: var(--green-50); border: 1px solid var(--green-200); border-radius: var(--r-pill); padding: 0 14px;
}
.pbpos.idle { font-weight: 400; font-size: 13.5px; color: var(--stone-500); background: transparent; border-color: transparent; direction: rtl; }
.pbbar .ghost { margin-left: 6px; }
.pbnote { text-align: center; }
/* הורדת קטע: שורת התקדמות מתחת לכפתורי הדילוג */
.pbcap { display: none; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; font-size: 14.5px; }
.pbcap.on { display: flex; }
.pbcap .ico { width: 18px; height: 18px; color: var(--green-700, #15803d); }
.pbcap progress { width: 200px; height: 8px; accent-color: var(--green-600, #16a34a); }

/* ---------- טלפון וטאבלט ---------- */
@media (max-width: 900px) {
  :root { --gutter: 16px; }
  .filters .search { width: 100%; margin: 0; order: -1; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .chips::-webkit-scrollbar { display: none; }
  .chips button { flex: none; }
}
@media (max-width: 700px) {
  .hdr .wrap { height: 56px; }
  .brand b { font-size: 18px; }
  .brand img { width: 30px; height: 30px; }
  .userbox .who { display: none; }
  .userbox .logout span:not(.ico) { display: none; }
  .userbox .logout { margin: 0; padding: 0; width: 36px; height: 36px; }
  .mainnav a { padding: 0 16px; font-size: 15px; }
  .subnav a { width: 96px; font-size: 13px; padding: 9px 2px 8px; }
  .content { padding: 16px 0 28px; }
  .page-title { margin-bottom: 14px; }
  .page-title h2 { font-size: 20px; }
  .cams { grid-template-columns: repeat(min(var(--cols, 2), 2), minmax(0, 1fr)); gap: 8px; }
  .cams.cols-1 { grid-template-columns: 1fr; }
  .seg-label { display: none; }

  /* טבלה הופכת לכרטיסים */
  table.list.responsive thead { display: none; }
  table.list.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 10px 4px; }
  table.list.responsive tr:last-child { border-bottom: 0; }
  table.list.responsive td { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 0; height: auto; padding: 4px 12px; }
  table.list.responsive td::before { content: attr(data-l); color: var(--stone-500); font-size: 13px; flex: none; }
  table.list.responsive td.actions { width: auto; justify-content: flex-end; padding-top: 8px; }
  table.list.responsive td.actions::before { content: none; }

  .pb-pick { flex: 1 1 100%; flex-wrap: wrap; }
  .pb-pick select { flex: 1 1 100%; width: auto; }
  .pb-pick input[type=date], .pb-pick input[type=time] { flex: 1 1 40%; width: auto; }
  .pb-pick button { flex: 1 1 100%; }
  .pb-pick select, .pb-pick input, .pb-pick button { height: 42px; }
  .pbplayer { max-height: none; }
  .pbbar { display: grid; grid-template-columns: repeat(3, 1fr); }
  .pbbar button { width: 100%; min-width: 0; padding: 0 4px; height: 36px; }
  .pbpos { grid-column: 1 / -1; order: -1; margin: 0; }
  .pbbar .ghost { display: none; }
  .pbbar .pbdl { grid-column: 1 / -1; }
  .pbcap progress { width: 100%; }
}
