/* ============================================================
   Ynex-style admin skin — local only (CSP-safe), RTL, dark mode.
   Palette + component reskin. All original class names preserved
   so every Jinja template keeps working.
   ============================================================ */

/* --- פונט Assistant (עברית) — vendored ל-static/fonts, תואם-CSP (font-src 'self')
   מ-@fontsource/assistant. hebrew+latin לכל משקל, font-display: swap. --------- */
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/assistant-hebrew-400-normal.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/assistant-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/assistant-hebrew-600-normal.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/assistant-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/assistant-hebrew-700-normal.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/assistant-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/assistant-hebrew-800-normal.woff2") format("woff2");
  unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("fonts/assistant-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* brand / accent (Ynex purple) */
  --accent: #845adf;
  --accent-rgb: 132, 90, 223;
  --accent-soft: rgba(132, 90, 223, 0.12);

  /* status colors — Ynex exact (rgb for soft tints) */
  --danger: #e6533c;  --danger-rgb: 230, 83, 60;
  --success: #26bf94; --success-rgb: 38, 191, 148;
  --info: #49b6f5;    --info-rgb: 73, 182, 245;
  --warn-rgb: 245, 184, 73;

  /* surfaces — neutral palette with a subtle violet cast toward --accent */
  --bg: #eef0f7;
  --panel: #ffffff;
  --panel-2: #f4f5fb;
  --line: #e7e9f2;
  --line-strong: #d8dbeb;

  /* text — darkened for comfortable AA contrast on light surfaces */
  --text: #23233d;
  --muted: #656a85;

  /* status */
  --signal: #22a06b;
  --warn: #c07a00;
  --warn-bg: #fdf6e9;
  --he: #22a06b;
  --en: #845adf;
  --ar: #c07a00;

  /* sidebar (white in light theme, dark in dark theme) */
  --side-bg: #ffffff;
  --side-bg-2: #f1f3f6;
  --side-text: rgba(26, 34, 48, 0.66);
  --side-text-strong: #1a2230;
  --side-line: #e6e9ef;

  /* header */
  --header-bg: #ffffff;

  /* shape */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow: 0 1px 2px rgba(23, 25, 60, 0.05), 0 4px 14px rgba(23, 25, 60, 0.06);
  --shadow-soft: 0 1px 3px rgba(23, 25, 60, 0.06);
  --shadow-lg: 0 4px 12px rgba(23, 25, 60, 0.08), 0 18px 40px rgba(23, 25, 60, 0.10);
  --ring: 0 0 0 3px rgba(var(--accent-rgb), 0.35);

  /* spacing scale (4px base) — consistent rhythm across cards/sections */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 22px;
  --sp-6: 30px;
  --sp-7: 44px;

  /* type scale (Assistant) */
  --lh-tight: 1.2;
  --lh-snug: 1.35;
  --lh-body: 1.55;
  --ls-label: 0.06em;

  /* layout metrics */
  --sidebar-w: 250px;
  --header-h: 64px;
}

html.dark {
  --bg: #14151f;
  --panel: #1c1d2b;
  --panel-2: #242539;
  --line: #2e3047;
  --line-strong: #3b3d57;
  --text: #dcdef0;
  --muted: #949ab6;
  --warn-bg: #2c2510;
  --warn: #f5b849;        /* בהיר יותר לקריאוּת על רקע כהה */
  --side-bg: #16172a;
  --side-bg-2: #222440;
  --side-text: rgba(226, 230, 245, 0.66);
  --side-text-strong: #ffffff;
  --side-line: rgba(255, 255, 255, 0.09);
  --header-bg: #1c1d2b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.34), 0 4px 16px rgba(0, 0, 0, 0.30);
  --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.42), 0 22px 48px rgba(0, 0, 0, 0.40);
  --ring: 0 0 0 3px rgba(var(--accent-rgb), 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Assistant", "IBM Plex Sans Hebrew", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: var(--lh-body);
  font-weight: 400;
  letter-spacing: -0.003em;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.mono { font-family: "IBM Plex Mono", "SF Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-underline-offset: 2px; }

/* Type scale (Assistant weights: 400 / 600 / 700 / 800) */
h1, h2, h3, h4 { line-height: var(--lh-snug); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 800; line-height: var(--lh-tight); }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
strong, b { font-weight: 700; }
small { font-size: 12.5px; }

/* generic muted text helper (used in templates, previously unstyled) */
.muted { color: var(--muted); }

/* keyboard focus fallback — zero specificity so component rings win */
:where(button, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

/* ============================================================
   APP SHELL — fixed dark sidebar (right, RTL) + top header
   ============================================================ */

.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  left: auto;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--side-bg);
  border-left: 1px solid var(--side-line);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}
.sidebar-brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid var(--side-line);
  flex: 0 0 auto;
}
.sidebar-brand img { height: 34px; width: auto; display: block; }
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 14px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--side-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.006em;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover { color: var(--side-text-strong); background: var(--side-bg-2); }
.sidebar-nav a.active { color: #fff; background: var(--accent); box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.32); }
.sidebar-nav a:focus-visible,
.sidebar-nav .nav-dd > summary:focus-visible { outline: none; box-shadow: var(--ring); }
.sidebar-nav a .ico {
  width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.72;
}
.sidebar-nav a:hover .ico { opacity: 0.95; }
.sidebar-nav a.active .ico { opacity: 1; }
.sidebar-sep { height: 1px; background: var(--side-line); margin: 12px 6px; }
.sidebar-nav a.logout { color: #c0392b; margin-top: 4px; }
.sidebar-nav a.logout:hover { color: #fff; background: rgba(214, 60, 60, 0.85); }
html.dark .sidebar-nav a.logout { color: #ff9b9b; }
html.dark .sidebar-nav a.logout:hover { background: rgba(214, 60, 60, 0.5); }

/* sidebar dropdowns (Studio / Telegram) — <details>, CSS-only (CSP-safe),
   expand inline inside the dark sidebar (works on desktop + mobile drawer) */
.sidebar-nav .nav-dd > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 11px;
  color: var(--side-text); font-size: 14px; font-weight: 600;
  padding: 10px 14px; border-radius: var(--radius-sm);
}
.sidebar-nav .nav-dd > summary::-webkit-details-marker { display: none; }
.sidebar-nav .nav-dd > summary::after { content: "▾"; margin-inline-start: auto; font-size: 10px; opacity: 0.7; }
.sidebar-nav .nav-dd > summary:hover { color: var(--side-text-strong); background: var(--side-bg-2); }
.sidebar-nav .nav-dd[open] > summary { color: var(--side-text-strong); }
.sidebar-nav .nav-dd-menu { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px; }
.sidebar-nav .nav-dd-menu a {
  color: var(--side-text); font-size: 13px; font-weight: 600;
  padding: 9px 14px 9px 40px; border-radius: var(--radius-sm); text-decoration: none;
}
.sidebar-nav .nav-dd-menu a:hover { color: var(--side-text-strong); background: var(--side-bg-2); }

.appheader {
  position: fixed;
  top: 0;
  left: 0;
  right: var(--sidebar-w);
  height: var(--header-h);
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  z-index: 90;
}
.appheader .spacer { flex: 1; }
.appheader .who { font-size: 13px; color: var(--muted); }
.appheader .who strong { color: var(--text); font-weight: 700; }

/* header "current client" pill + generic badge (were unstyled in templates) */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1;
  padding: 6px 12px; border-radius: var(--radius-pill);
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  white-space: nowrap;
}
.appheader select {
  background: var(--panel-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 8px 11px; color: var(--text);
  font-size: 13px; font-family: inherit;
}
.appheader select:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

/* dark / light toggle button */
.theme-toggle {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--text);
  cursor: pointer; font-size: 18px; line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.theme-toggle:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.theme-toggle:active { transform: translateY(1px); }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: inline; }
html.dark .theme-toggle .i-sun { display: inline; }
html.dark .theme-toggle .i-moon { display: none; }

/* main content area clears the fixed sidebar + header */
.wrap {
  margin-right: var(--sidebar-w);
  margin-left: 0;
  max-width: none;
  padding: calc(var(--header-h) + 26px) 30px 60px;
}

/* hamburger + drawer backdrop (mobile only) */
.hamburger { display: none; }
.navtoggle { display: none; }
.nav-overlay { display: none; }

/* ============================================================
   CARDS / GRID / SECTIONS
   ============================================================ */

.grid { display: grid; gap: var(--sp-5); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
}
.card .label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 700; }
.card .value { font-size: 30px; font-weight: 800; line-height: var(--lh-tight); letter-spacing: -0.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.card .value.cost { color: var(--warn); }
.card .sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.section-title { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: var(--ls-label); font-weight: 700; margin: var(--sp-6) 0 var(--sp-4); display: flex; align-items: center; gap: 9px; }
.section-title::before { content: ""; flex: 0 0 auto; width: 4px; height: 13px; border-radius: 2px; background: var(--accent); }

/* ============================================================
   TABLES
   ============================================================ */

table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: var(--ls-label); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s ease; }
tbody tr:hover { background: var(--panel-2); }
tbody td { font-variant-numeric: tabular-nums; }
td.num { text-align: end; font-variant-numeric: tabular-nums; font-weight: 600; }

.ltr { direction: ltr; text-align: start; unicode-bidi: isolate; }
.nowrap { white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.posts-table { min-width: 720px; }
.posts-table td { vertical-align: top; line-height: 1.45; }
.posts-table .cell-he, .posts-table .cell-ar { max-width: 280px; }
.posts-table .cell-en { max-width: 280px; }
.posts-table td a { color: var(--accent); text-decoration: none; font-size: 13px; }
.posts-table td a:hover { text-decoration: underline; }
.posts-table .post-link { display: inline-block; margin-top: 6px; font-size: 12px; white-space: nowrap; }

/* ============================================================
   BAR CHART
   ============================================================ */

.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.bars .bar { flex: 1; background: linear-gradient(var(--accent), rgba(var(--accent-rgb), 0.3)); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; }
.bars .bar:hover::after { content: attr(data-val); position: absolute; top: -24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--text); color: var(--panel); padding: 2px 7px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.bars-x { display: flex; gap: 6px; margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; font-size: 10px; color: var(--muted); }

/* ============================================================
   POSTS (cards w/ lang rows)
   ============================================================ */

.post { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.post .meta { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.post .meta .id { font-family: "IBM Plex Mono", monospace; }
.post .langrow { display: grid; grid-template-columns: 30px 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); align-items: start; }
.post .langrow:first-of-type { border-top: none; }
.post .tag { font-size: 11px; font-weight: 700; padding: 3px 0; text-align: center; border-radius: 5px; }
.tag-he { background: rgba(34, 160, 107, 0.14); color: var(--he); }
.tag-en { background: var(--accent-soft); color: var(--en); }
.tag-ar { background: rgba(192, 122, 0, 0.14); color: var(--ar); }
.post .txt { font-size: 14px; line-height: 1.55; }
.post .txt.ltr { direction: ltr; text-align: left; }

/* ============================================================
   AUTH / PUBLIC (login, 2FA, forbidden, home)
   ============================================================ */

/* דף בית ציבורי — לוגו ממורכז בלבד (בלי סייד-בר/ניווט) */
.public-home { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.public-logo { display: block; width: 220px; max-width: 70%; height: auto; }

.login-screen { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.login-card { width: 100%; max-width: 390px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 32px; box-shadow: var(--shadow-lg); }
.login-card .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); margin: 0 auto 18px; }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; font-weight: 800; letter-spacing: -0.01em; }
.login-card p { text-align: center; color: var(--muted); font-size: 13.5px; margin-bottom: 24px; }

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 600; }
input[type=password], input[type=text], input[type=email] { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
input:focus, input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--panel); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.7; }
input.code { text-align: center; letter-spacing: 8px; font-size: 20px; font-family: "IBM Plex Mono", monospace; }

.btn { width: 100%; background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 12px; font-size: 14px; font-weight: 700; letter-spacing: -0.006em; cursor: pointer; margin-top: 18px; font-family: inherit; box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.28); transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.06s ease; }
.btn:hover { filter: brightness(1.07); box-shadow: 0 6px 18px rgba(var(--accent-rgb), 0.36); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.30); }
.btn:focus-visible { outline: none; box-shadow: var(--ring), 0 4px 12px rgba(var(--accent-rgb), 0.28); }
/* Alerts — Ynex soft style: tinted bg + matching border + full-color text (theme-agnostic) */
.error { background: rgba(var(--danger-rgb), 0.1); border: 1px solid rgba(var(--danger-rgb), 0.22); color: var(--danger); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px; }
.notice { background: rgba(var(--success-rgb), 0.1); border: 1px solid rgba(var(--success-rgb), 0.22); color: var(--success); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px; }
.warn-box { background: rgba(var(--warn-rgb), 0.1); border: 1px solid rgba(var(--warn-rgb), 0.28); color: var(--warn); padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-top: 18px; }
.empty { color: var(--muted); font-size: 14px; padding: 30px; text-align: center; }

.field-row { margin-bottom: 16px; }
.field-row .status { font-size: 12px; margin-inline-start: 8px; font-weight: 600; }
.status.set { color: var(--signal); }
.status.unset { color: var(--muted); }
.field-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: 18px; box-shadow: var(--shadow); }
.field-group h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: var(--ls-label); color: var(--muted); margin-bottom: 16px; font-weight: 700; }

/* ============================================================
   HOME (logo only)
   ============================================================ */

.home-screen { display: flex; min-height: 100vh; align-items: center; justify-content: center; }
.logo-mark { width: 72px; height: 72px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; }
.logo-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.home-logo { padding: 32px 40px; background: var(--panel); border-radius: 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.home-logo img { width: 320px; max-width: 70vw; height: auto; display: block; }
.login-logo { display: block; width: 200px; max-width: 70%; height: auto; margin: 0 auto 20px; }

/* ============================================================
   CONSOLE (module cards)
   ============================================================ */

.module-card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
.module-card:hover:not(.disabled) { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.18); }
.module-card:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.module-card.disabled { opacity: 0.55; }
.module-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.module-desc { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.module-go { font-size: 13px; color: var(--accent); font-weight: 700; margin-top: 18px; }
.module-card.disabled .module-go { color: var(--muted); }

/* ============================================================
   BOOKS
   ============================================================ */

.books-opts { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; margin: 16px 0; }
.books-opts select, .books-opts input[type=text] { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; }
.cache-row { display: flex; align-items: center; gap: 8px; padding-bottom: 11px; }
.cache-row label { margin-bottom: 0; }
input[type=file] { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 13px; font-size: 14px; font-family: inherit; color: var(--text); }

.book-table { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.book-row { display: grid; grid-template-columns: 80px 1fr 130px 200px; gap: 16px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.book-row:last-child { border-bottom: none; }
.book-head { background: var(--panel-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 600; }
.cover-thumb { width: 64px; height: 86px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); }
.cover-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.book-title { font-weight: 600; font-size: 14px; display: block; margin-bottom: 8px; }
.book-pages { font-size: 12px; color: var(--muted); }
.job-bar { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.job-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--he)); border-radius: 3px; transition: width 0.4s; }
.bc-status [data-status] { font-size: 13px; font-weight: 600; }
.job-err { color: #d63c3c; font-size: 11px; margin-top: 4px; }
.bc-links { display: flex; flex-direction: column; gap: 6px; }
.dl-link { font-size: 13px; text-decoration: none; padding: 5px 10px; border-radius: 6px; text-align: center; font-weight: 600; }
.dl-source { background: rgba(127, 132, 160, 0.14); color: var(--muted); }
.dl-source:hover { background: rgba(127, 132, 160, 0.24); }
.dl-he { background: var(--accent-soft); color: var(--accent); }
.dl-he:hover { background: rgba(var(--accent-rgb), 0.2); }

/* ============================================================
   ARTICLES
   ============================================================ */

textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.6; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
textarea:focus, textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--panel); }
/* generic select focus (books-opts / page-actions / field-row / inline) */
select { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ============================================================
   ELEMENTOR
   ============================================================ */

.how-steps { margin: 0; padding-inline-start: 20px; }
.how-steps li { font-size: 13px; color: var(--text); margin-bottom: 8px; line-height: 1.6; }
.how-steps code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.pages-list { margin-top: 14px; }
.page-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; flex-wrap: wrap; }
.page-title { font-size: 14px; font-weight: 500; }
.page-actions { display: flex; gap: 8px; align-items: center; }
.page-actions select { background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; font-size: 13px; font-family: inherit; color: var(--text); }
.btn-sm { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 8px 15px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; transition: filter 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease; }
.btn-sm:hover { filter: brightness(1.07); }
.btn-sm:active { transform: translateY(1px); }
.btn-sm:focus-visible { outline: none; box-shadow: var(--ring); }
/* כפתור משני (קו מתאר) — לפעולות מהשורה השנייה */
.btn-ghost { background: var(--panel); color: var(--accent); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; transition: background 0.15s ease, border-color 0.15s ease, transform 0.06s ease; }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn-ghost:active { transform: translateY(1px); }
.btn-ghost:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
/* כותרת מודול עם פעולות בצד */
.studio-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.studio-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ============================================================
   USERS
   ============================================================ */

.modules-check { display: flex; flex-wrap: wrap; gap: 12px; margin: 10px 0; }
.check-item { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 0; cursor: pointer; }
.user-row { display: flex; gap: 12px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.user-form { flex: 1; }
.user-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.user-name { font-weight: 700; font-size: 14px; }
.user-role { display: inline-block; font-size: 11px; padding: 3px 11px; border-radius: var(--radius-pill); font-weight: 700; letter-spacing: 0.01em; }
.role-super-admin { background: var(--accent-soft); color: var(--accent); }
.role-internal { background: rgba(34, 160, 107, 0.14); color: var(--he); }
.role-external { background: rgba(127, 132, 160, 0.14); color: var(--muted); }
.user-actions { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.pw-input { flex: 1; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: 6px; padding: 7px 10px; font-size: 13px; font-family: inherit; color: var(--text); }
.btn-del { background: rgba(var(--danger-rgb), 0.1); color: var(--danger); border: 1px solid rgba(var(--danger-rgb), 0.28); border-radius: var(--radius-sm); padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; height: fit-content; transition: background 0.15s ease, border-color 0.15s ease; }
.btn-del:hover { background: rgba(var(--danger-rgb), 0.18); border-color: rgba(var(--danger-rgb), 0.4); }
.btn-del:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(var(--danger-rgb), 0.35); }
html.dark .btn-del { background: #3a1d1d; border-color: #5e2a2a; color: #ff9d9d; }
html.dark .btn-del:hover { background: #4a2424; }

/* ============================================================
   LOGO bits shared
   ============================================================ */

.brand-logo { height: 34px; width: auto; display: block; }
.brand-home { display: inline-flex; align-items: center; text-decoration: none; }

/* ============================================================
   SETTINGS (side-menu, panels)
   ============================================================ */

.settings-layout { display: grid; grid-template-columns: 210px 1fr; gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 4px; }
.settings-nav button { text-align: start; background: none; border: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-radius: var(--radius-sm); cursor: pointer; border-inline-start: 3px solid transparent; transition: background 0.15s ease, color 0.15s ease; }
.settings-nav button:hover { background: var(--panel-2); color: var(--text); }
.settings-nav button.active { background: var(--accent-soft); color: var(--accent); border-inline-start-color: var(--accent); font-weight: 700; }
.settings-nav button:focus-visible { outline: none; box-shadow: var(--ring); }
.settings-main { min-width: 0; }
.settings-main .panel { display: none; margin-bottom: 18px; }
.settings-main .panel.active { display: block; }
.add-gemini, .btn-add { background: var(--panel-2); color: var(--accent); border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: 9px 14px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.add-gemini:hover, .btn-add:hover { background: var(--accent-soft); }
.doc-link { font-size: 12px; margin: -8px 0 14px; }
.doc-link a { color: var(--accent); text-decoration: none; }
.doc-link a:hover { text-decoration: underline; }
.subhead { font-size: 13px; font-weight: 700; color: var(--text); margin: 20px 0 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.subhead:first-of-type { border-top: none; padding-top: 0; }
.site-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px 4px; margin-bottom: 14px; background: var(--panel-2); }
.site-card-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.field-row select { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 11px 13px; color: var(--text); font-size: 14px; font-family: inherit; }
.field-row select:focus, .field-row select:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* ============================================================
   RESPONSIVE — sidebar becomes off-canvas drawer (from right, RTL)
   ============================================================ */

@media (max-width: 992px) {
  .grid.cols-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --sidebar-w: 0px; }

  .wrap { margin-right: 0; margin-left: 0; padding: calc(var(--header-h) + 18px) 16px 48px; overflow-x: hidden; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .appheader { left: 0; right: 0; }

  /* hamburger in header */
  .hamburger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 10px; border-radius: var(--radius-sm);
    cursor: pointer; flex: 0 0 auto; border: 1px solid var(--line); background: var(--panel-2);
  }
  .hamburger span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; }

  /* off-canvas sidebar */
  .sidebar {
    width: 270px; max-width: 85vw;
    right: -300px; left: auto;
    transition: right 0.25s ease;
    box-shadow: -6px 0 24px rgba(20, 30, 50, 0.32);
  }
  .navtoggle:checked ~ .sidebar { right: 0; }

  /* clickable backdrop: a real <label for=navtoggle> so a tap closes the drawer */
  .nav-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(15, 18, 30, 0.5);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 95; cursor: pointer;
  }
  .navtoggle:checked ~ .nav-overlay { opacity: 1; visibility: visible; }

  /* responsive tables: row -> card */
  .rtable thead { display: none; }
  .rtable tr { display: block; margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; background: var(--panel); }
  .rtable tr:hover { background: var(--panel); }
  .rtable td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 4px; border: 0; text-align: start; }
  .rtable td::before { content: attr(data-label); font-weight: 600; color: var(--muted); flex: 0 0 auto; }
  .rtable td.num { text-align: start; }

  /* touch-friendly forms */
  .wrap input, .wrap select, .wrap textarea,
  .field-row input, .field-row select,
  .books-opts select, .books-opts input[type=text],
  input[type=password], input[type=text], input[type=file],
  .btn, .btn-sm, .btn-add, .add-gemini, form button {
    width: 100%; font-size: 16px; min-height: 44px;
  }
  .theme-toggle, .hamburger { width: 42px; min-height: 42px; }
  .cache-row input[type=checkbox], .check-item input[type=checkbox], .modules-check input[type=checkbox] { width: auto; min-height: 0; }
  .check-item, .cache-row { width: auto; }
  .user-actions, .page-actions { flex-wrap: wrap; }
  .pw-input { flex: 1 1 100%; }

  .settings-layout { grid-template-columns: 1fr; gap: 14px; }
  .settings-nav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .settings-nav button { white-space: nowrap; border-inline-start: none; border-bottom: 3px solid transparent; border-radius: 8px 8px 0 0; }
  .settings-nav button.active { border-inline-start: none; border-bottom-color: var(--accent); }

  .books-opts { grid-template-columns: 1fr; }
  .book-row { grid-template-columns: 56px 1fr; gap: 12px; }
  .bc-status, .bc-links { grid-column: 2; }
  .book-head { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===== חדר מלחמה (warroom) — עיצוב פונקציונלי בסיסי (סופי: סוכן עיצוב) ===== */
.warroom-stats { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.warroom-add { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.warroom-add input, .warroom-add select { padding:8px; border-radius:8px;
  border:1px solid #2a3b4d; background:#0e1a26; color:inherit; }
.warroom-filters { display:flex; gap:8px; margin-bottom:12px; }
.wr-chip { display:inline-block; padding:3px 10px; border-radius:999px;
  font-size:13px; background:#1b2a3a; color:#cfe; text-decoration:none; }
.wr-chip-on { outline:2px solid #4ea1ff; }
.wr-clean, .wr-status-clean .wr-chip { background:#0d3b2e; color:#7ef0c0; }
.wr-junk, .wr-status-junk .wr-chip { background:#3b1d1d; color:#ffb0b0; }
.wr-raw { background:#3b340d; color:#f0dd7e; }
.wr-post { border:1px solid #21303f; border-radius:10px; padding:12px;
  margin-bottom:10px; background:#0e1a26; }
.wr-post-head { display:flex; gap:10px; align-items:center; margin-bottom:6px; }
.wr-post-text { white-space:pre-wrap; line-height:1.5; }
.wr-lang { font-size:12px; opacity:.6; text-transform:uppercase; }
.wr-src-link { font-size:12px; color:#4ea1ff; margin-inline-start:auto; }
.wr-err { color:#ffb0b0; }
.data-table { width:100%; border-collapse:collapse; }
.data-table th, .data-table td { text-align:right; padding:8px 10px;
  border-bottom:1px solid #21303f; font-size:14px; }
.data-table th { opacity:.6; font-weight:600; }
.link-btn { background:none; border:none; color:#4ea1ff; cursor:pointer;
  font:inherit; padding:0; }
.link-danger { color:#ff8080; }
.btn-secondary { background:#1b2a3a; }
.cost-bars { display:flex; gap:6px; align-items:flex-end; height:120px;
  overflow-x:auto; padding-top:8px; }
.cost-bar-col { display:flex; flex-direction:column; align-items:center;
  justify-content:flex-end; min-width:34px; height:100%; }
.cost-bar { width:22px; background:#4ea1ff; border-radius:4px 4px 0 0;
  min-height:2px; }
.cost-bar-label { font-size:10px; opacity:.6; margin-top:4px; }


/* ============================================================
   THEME SWITCHER — design options (CSP-safe; driven by switcher.js)
   ============================================================ */

/* Sidebar section labels (MAIN / PAGES style) + nav badges */
.sidebar-label { color: rgba(255,255,255,.4); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 14px 16px 6px; }
.nav-badge { margin-inline-start: auto; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 999px; line-height: 1.6; }
.nav-badge.new { background: rgba(73,182,245,.22); color: #49b6f5; }

/* Switcher panel (slides in from the inline-end) */
.switcher { position: fixed; top: 0; inset-inline-end: -360px; width: 330px; max-width: 90vw; height: 100vh; background: var(--panel); border-inline-start: 1px solid var(--line); box-shadow: -8px 0 40px rgba(20,30,50,.18); z-index: 1200; transition: inset-inline-end .28s ease; overflow-y: auto; }
.switcher.open { inset-inline-end: 0; }
.switcher-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.switcher-head h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.switcher-head .x { cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); font-size: 20px; border: none; background: none; }
.switcher-head .x:hover { background: var(--panel-2); color: var(--text); }
.switcher-sec { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.switcher-sec h4 { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.sw-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-opt { cursor: pointer; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 600; }
.sw-opt:hover { border-color: var(--accent); }
.sw-opt.sel { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sw-color { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
.sw-color.sel { box-shadow: 0 0 0 2px var(--accent); }
.sw-overlay { position: fixed; inset: 0; background: rgba(20,30,50,.4); opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s; z-index: 1199; cursor: pointer; }
.sw-overlay.open { opacity: 1; visibility: visible; }

/* ===== חדר מלחמה — אירועים (מודול 2) ===== */
.ev-card { border-right: 4px solid #2a3b4d; }
.ev-sev-0 { border-right-color:#3a4654; }
.ev-sev-1 { border-right-color:#4a7; }
.ev-sev-2 { border-right-color:#7a4; }
.ev-sev-3 { border-right-color:#da3; }
.ev-sev-4 { border-right-color:#e72; }
.ev-sev-5 { border-right-color:#e33; }
.ev-head { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:8px; }
.ev-sev-badge { padding:2px 10px; border-radius:999px; font-size:13px; font-weight:600;
  background:#1b2a3a; color:#cfe; }
.ev-sev-badge.ev-sev-3 { background:#3b300d; color:#f0cf7e; }
.ev-sev-badge.ev-sev-4 { background:#3b220d; color:#f0b07e; }
.ev-sev-badge.ev-sev-5 { background:#3b1010; color:#ff9090; }
.ev-loc { font-size:13px; opacity:.85; }
.ev-status { margin-inline-start:auto; font-size:12px; opacity:.6; }
.ev-status-approved { color:#7ef0c0; opacity:1; }
.ev-status-rejected { color:#ff9090; opacity:1; }
.ev-summaries { display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }
.ev-sum { line-height:1.5; }
.ev-sum b { opacity:.5; font-size:11px; margin-inline-end:6px; }
.ev-actions { display:flex; gap:14px; align-items:center; }

/* ============================================================
   CONSOLE HOME — "mission control" (hero + KPIs + tool cards)
   ============================================================ */
.hero {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.16), transparent 55%),
    linear-gradient(120deg, var(--accent) 0%, rgba(var(--accent-rgb), 0.86) 100%);
  color: #fff; border-radius: var(--radius); padding: 28px 32px;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.28); margin-bottom: 22px; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; inset-inline-start: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-text { position: relative; z-index: 1; }
.hero-text h1 { font-size: 25px; font-weight: 800; letter-spacing: -0.02em; line-height: var(--lh-tight); margin-bottom: 8px; }
.hero-text p { font-size: 14.5px; opacity: .94; max-width: 560px; line-height: 1.55; }
.hero-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.hero-badge { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #41e0a3; box-shadow: 0 0 0 4px rgba(65,224,163,.25); }

.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.kpi { display: flex; align-items: center; gap: 14px; }
.kpi-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kpi-ico svg { width: 22px; height: 22px; }
.kpi .label { font-size: 11px; }
.kpi .value { font-size: 24px; margin-top: 2px; }

/* tool cards: module-card + leading icon */
.module-card .m-ico { width: 44px; height: 44px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; transition: background .15s; }
.module-card .m-ico svg { width: 23px; height: 23px; }
.module-card:hover:not(.disabled) .m-ico { background: var(--accent); color: #fff; }

@media (max-width: 992px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } .hero { flex-direction: column; align-items: flex-start; } }
@media (max-width: 760px) { .grid.cols-4 { grid-template-columns: 1fr; } }

/* ===== חדר מלחמה — מפות ===== */
.map-bar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.map-controls { display:flex; gap:8px; align-items:center; margin-inline-start:auto; flex-wrap:wrap; }
.map-legend { font-size:12px; opacity:.85; }
.map-legend span { font-size:14px; }
.warn-inline { color:#ffb0b0; font-size:13px; }
.mapboxgl-popup-content { background:#0e1a26 !important; color:#e8eef5 !important;
  border:1px solid #21303f; border-radius:8px; }
.mapboxgl-popup-content a { color:#4ea1ff; }

/* ===== תווית "סביבת פיתוח" (מוצגת רק כש-APP_ENV=dev) ===== */
.env-badge-dev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-inline-start: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #f5b020, #f5b020 10px, #e09a00 10px, #e09a00 20px);
  color: #1a1200;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(224, 154, 0, 0.4);
}
/* פס עליון כתום על כל הכותרת ב-dev — אי-אפשר לפספס באיזו סביבה אתה */
.appheader:has(.env-badge-dev) { border-top: 4px solid #e09a00; }
@media (max-width: 760px) {
  .env-badge-dev { font-size: 13px; padding: 5px 11px; }
}

/* ============================================================
   אישור-מחיקה דו-שלבי (CSP-safe, בלי JS) + הדפסה
   ============================================================ */
.confirm-del { display: inline-block; }
.confirm-del > summary {
  list-style: none; cursor: pointer; display: inline-block;
}
.confirm-del > summary::-webkit-details-marker { display: none; }
.confirm-del[open] > summary { opacity: 0.6; }
.confirm-del .confirm-del-go { margin-top: 8px; }

/* הדפסה: להסתיר את הכרום הקבוע כדי שדוחות יודפסו נקי (בלי סיידבר/כותרת חוזרים) */
@media print {
  .sidebar, .appheader, .help-fab, .hamburger, .nav-overlay, .theme-toggle { display: none !important; }
  .wrap { margin: 0 !important; padding: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc; }
}
