/* PatrolLog — עיצוב "שלטים" (17/10/2026, ברק). שכבה על app.css, פעילה כש-html נושא
   data-theme="sign-d" (ברירת המחדל מ-17/10). בלי המאפיין — העיצוב הקלאסי, בלי שינוי.
   משמעות הצבעים לא משתנה: ירוק בוצע, כתום פתוח, אדום ממצא, אפור לא ידוע (S0). */

@font-face { font-family: "Rubik"; src: url(fonts/rubik-hebrew.woff2) format("woff2"); font-weight: 400 800; font-display: swap;
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Rubik"; src: url(fonts/rubik-latin.woff2) format("woff2"); font-weight: 400 800; font-display: swap;
  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[data-theme="sign-d"] {
  --shell: #0a2540; --shell-ink: #061a2f; --on-shell: #ffffff; --on-shell-2: #b8c7d9;
  --canvas: #f6f8fa; --panel: #ffffff; --line: #e3e8ee; --line-strong: #cfd7df;
  --ink: #0a2540; --ink-2: #425466; --ink-3: #56657a;
  --accent: #1f6feb; --accent-ink: #0b4fc4; --accent-soft: #e8f0fe;
  --lv-b: #0e7490; --band: #1f6feb;
}
:root[data-theme^="sign"] {
  --font: "Rubik", system-ui, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(10, 37, 64, .07), 0 3px 10px rgba(10, 37, 64, .05);
  --hatch: repeating-linear-gradient(135deg, var(--none) 0 1.5px, transparent 1.5px 5px);
  -webkit-tap-highlight-color: transparent;
}
/* Rubik כבד יותר מגופן המערכת באותו משקל — הגוף קטן מעט, והמודגש יורד דרגה (17/10, ברק: "פחות בולט, נעים לעין") */
[data-theme^="sign"] body { font-variant-numeric: tabular-nums; font-size: 14.5px; }
[data-theme^="sign"] b, [data-theme^="sign"] strong { font-weight: 600; }
[data-theme^="sign"] .rep .when { font-weight: 500; }
[data-theme^="sign"] .rep .fence b { font-weight: 500; }
[data-theme^="sign"] .site-link { font-weight: 500; }
[data-theme^="sign"] .sheet-head h2 { font-weight: 600; }
[data-theme^="sign"] th { font-weight: 500; }
[data-theme^="sign"] ::selection { background: var(--accent-soft); }

/* ---------- פס עליון: לוח השלט ---------- */
[data-theme^="sign"] .bar { background: var(--shell); border-bottom: 0; }
[data-theme^="sign"] .brand { color: var(--on-shell); font-weight: 700; font-size: 19px; }
[data-theme^="sign"] .fresh { color: var(--on-shell-2); }
[data-theme^="sign"] .fresh::after { content: none; }
[data-theme^="sign"] .fresh svg { color: var(--on-shell-2); }
/* "נכון ל-" כעמוד קילומטר: לוחית לבנה קטנה */
[data-theme^="sign"] .fresh { background: rgba(255, 255, 255, .1); border-radius: 6px; padding: 3px 8px; }
[data-theme^="sign"] .fresh.stale { background: #fff4cf; color: #7a4d00; }
[data-theme^="sign"] .fresh.stale svg { color: #7a4d00; }
[data-theme^="sign"] .fresh.down { background: #fde8e8; color: #a11d1d; }
[data-theme^="sign"] .fresh.down svg { color: #a11d1d; }
[data-theme^="sign"] .bar .icon-btn { color: var(--on-shell-2); }
[data-theme^="sign"] .tabs-top .tab { color: var(--on-shell-2); }
[data-theme^="sign"] .tabs-top .tab[aria-current="page"] { color: var(--on-shell); border-bottom-color: var(--on-shell); }
@media (hover: hover) and (pointer: fine) { [data-theme^="sign"] .tabs-top .tab:hover { color: var(--on-shell); } }
/* פוקוס על הרקע הכהה — מסגרת לבנה; הכחול נבלע בנייבי (3.3:1) */
[data-theme^="sign"] .bar :focus-visible, [data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) :focus-visible { outline-color: #fff; }
[data-theme^="sign"] .tabs-bottom { box-shadow: 0 -2px 12px rgba(10, 37, 64, .06); }
[data-theme^="sign"] .tabs-bottom .tab[aria-current="page"] { color: var(--shell); font-weight: 600; }
[data-theme^="sign"] .tabs-bottom .tab[aria-current="page"]::before { height: 3px; inset-inline: 22%; background: var(--shell); }
[data-theme="sign-d"] .tabs-bottom .tab[aria-current="page"] { color: var(--accent-ink); }
[data-theme="sign-d"] .tabs-bottom .tab[aria-current="page"]::before { background: var(--accent); }

/* ---------- כרטיסים: פס צבע עליון לפי תפקיד ---------- */
[data-theme^="sign"] .grid-3 > .panel { position: relative; overflow: hidden; }
[data-theme^="sign"] .grid-3 > .panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--band); }
[data-theme^="sign"] .grid-3 > .panel.is-b::before { background: var(--lv-b); }
[data-theme^="sign"] .grid-3 > .panel.is-past::before { background: var(--line-strong); }
[data-theme^="sign"] .panel-head h2 { color: var(--ink); font-weight: 500; }
[data-theme^="sign"] .big { font-weight: 600; font-size: 38px; letter-spacing: -.03em; line-height: 1; }
[data-theme^="sign"] .big small { font-size: 15px; font-weight: 400; }

/* פס השבוע — מקטע לכל אתר; פתוח = קווקוו (נקרא בלי צבע) */
[data-theme^="sign"] .meter { height: 10px; gap: 3px; background: none; border-radius: 0; overflow: visible; }
[data-theme^="sign"] .meter span { border-radius: 2px; }
[data-theme^="sign"] .meter span.open { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--none); }
[data-theme^="sign"] .meter span.miss { background: transparent; box-shadow: inset 0 0 0 1.5px var(--bad); }
[data-theme^="sign"] .wkgrid i.open { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--none); }

[data-theme^="sign"] .shift div { border: 1px solid var(--line); background: var(--panel); }
[data-theme^="sign"] .shift b { font-weight: 600; font-size: 18px; }
[data-theme^="sign"] .shift .is-bad { background: var(--bad-soft); border-color: transparent; }
[data-theme^="sign"] .shift .is-warn { background: var(--warn-soft); border-color: transparent; }

/* ---------- 7 ימים לאתר יומי: יום ולילה בכל יום ---------- */
.wk7 { display: none; }
[data-theme^="sign"] .wk7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 12px; }
[data-theme^="sign"] .wk7 div { display: grid; gap: 2px; text-align: center; font-size: 10.5px; color: var(--ink-3); }
[data-theme^="sign"] .wk7 i { height: 9px; border-radius: 2px; background: var(--ok); }
/* לא רק צבע (ת"י 5568 / WCAG 1.4.1): חסר = מסגרת ריקה, חלוקה חסרה = חצי מלא, עמד = מלא */
[data-theme^="sign"] .wk7 i.x { background: transparent; box-shadow: inset 0 0 0 1.5px var(--bad); }
[data-theme^="sign"] .wk7 i.w { background: linear-gradient(to left, #b7791f 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px #b7791f; }
[data-theme^="sign"] .wk7 i.o { background: var(--hatch); box-shadow: inset 0 0 0 1px var(--none); }
[data-theme^="sign"] .wk7 .today { color: var(--ink); font-weight: 600; }

/* ---------- "לפעולה": שלטי הכוונה ---------- */
.lvl { display: none; }
[data-theme^="sign"] .lvl { display: inline-block; font-size: 11px; font-weight: 500; color: #fff; background: var(--lv-b); border-radius: 4px; padding: 0 5px; margin-inline-start: 6px; vertical-align: 2px; }
[data-theme^="sign"] .row .lead { width: 32px; height: 36px; border-radius: 7px 7px 15px 15px; }
[data-theme^="sign"] .row .t1 { font-weight: 500; font-size: 14.5px; }
[data-theme^="sign"] .row .chev { color: var(--accent); }
/* שלט הפוך אחד בלבד — הפריט הדחוף ביותר */
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) { background: var(--shell); border-radius: var(--radius-sm); margin: 4px 8px 6px; box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--shell); }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .t1,
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .t2 { color: var(--on-shell); }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .t2 { opacity: .9; }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .chev,
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .act-x { color: var(--on-shell-2); }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .lead { background: #fff; }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .lvl { background: #fff; color: var(--shell); }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) + .act-li { border-top: 0; }
[data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) .row:active { background: transparent; }

/* ---------- מצב "לא ידוע" גם בקווקוו ---------- */
[data-theme^="sign"] .badge.none, [data-theme^="sign"] .cell.none, [data-theme^="sign"] .cell.open, [data-theme^="sign"] .zone.n {
  background-image: repeating-linear-gradient(135deg, rgba(110, 119, 129, .14) 0 1.5px, transparent 1.5px 5px);
}
[data-theme^="sign"] .badge { font-weight: 500; border-radius: 6px; }
[data-theme^="sign"] .zone { border-radius: 8px; }
[data-theme^="sign"] .chip { font-weight: 400; }
[data-theme^="sign"] .page-head h1 { font-weight: 600; font-size: 22px; letter-spacing: -.015em; }
[data-theme^="sign"] .btn.primary { background: var(--accent); border-color: var(--accent); }

/* ---------- תנועה: קצרה, פעם אחת, ונעלמת כשהטלפון מבקש פחות תנועה ---------- */
@media (prefers-reduced-motion: no-preference) {
  [data-theme^="sign"] main.enter { animation: sign-in 220ms cubic-bezier(.16, 1, .3, 1); }
  @keyframes sign-in { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  [data-theme^="sign"] .act-li { transition: opacity 160ms ease; }
  [data-theme^="sign"] .row:active, [data-theme^="sign"] .chip:active, [data-theme^="sign"] .icon-btn:active { transform: scale(.98); }
}

/* Rubik רחב יותר מגופן המערכת: שדה תאריך מתרחב ודוחף את העמוד לגלילה צידית. השדות מתכווצים לרוחב העמודה. */
[data-theme^="sign"] .filters > label { min-width: 0; }
[data-theme^="sign"] .field { min-width: 0; max-width: 100%; width: 100%; }
[data-theme^="sign"] input[type="date"].field { font-family: system-ui, "Segoe UI", Arial, sans-serif; }

/* עיצוב כהה (25/10) — פעיל עם data-dark (ראה סוף app.css); אותם צבעים, והמעטפת נשארת נייבי */
:root[data-theme="sign-d"][data-dark] {
  --shell: #0a2540; --shell-ink: #061a2f; --on-shell: #ffffff; --on-shell-2: #b8c7d9;
  --canvas: #0d1626; --panel: #142033; --line: #24324a; --line-strong: #34445f;
  --ink: #e8eef6; --ink-2: #bccadb; --ink-3: #9aa9bd;
  --accent: #5b9bff; --accent-ink: #8fbaff; --accent-soft: #17294a;
  --lv-b: #0e7490; --band: #5b9bff;   /* lv-b כמו בבהיר — לבן עליו 5.4:1 (התווית ליד אתר רמה ב׳) */
  --shadow: none;
}
[data-dark][data-theme^="sign"] .tabs-bottom { box-shadow: none; }
/* הפריט הדחוף ב"לפעולה" — שלט הפוך: על רקע כהה הוא מקבל מסגרת כחולה כדי לבלוט */
[data-dark][data-theme^="sign"] .acts > .act-li:first-child:not(.is-hidden) { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--accent); }
