:root {
  --brand: #13315C;
  --brand-hover: #1C4277;
  --signal: #F2A900;
  --ink: #142235;
  --ink-2: #4A5B70;
  --muted: #8593A3;
  --line: #DCE3EA;
  --line-soft: #EBEFF3;
  --bg: #EEF2F6;
  --surface: #FFFFFF;
  --field: #F7F9FB;
  --ok: #1F8A4C;   --ok-bg: #E6F4EC;
  --good: #7C3AED; --good-bg: #F1EAFE; --good-ink: #6D28D9;
  --low: #EA730C;  --low-bg: #FFF0E0; --low-ink: #A84F06;
  --bad: #D03434;  --bad-bg: #FBE7E7;
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body { font-family: 'IBM Plex Sans Hebrew', 'Segoe UI', Tahoma, Arial, sans-serif; background: var(--bg); color: var(--ink); direction: rtl; font-size: 15px; line-height: 1.5; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font-family: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
a { color: inherit; }

/* כותרת עליונה */
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 60; }
.app-header-inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; min-height: 60px; }
.brand-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-lockup img { width: 34px; height: 34px; display: block; }
.brand-word { font-size: 19px; font-weight: 600; color: var(--brand); letter-spacing: -0.3px; direction: ltr; }
.brand-word b { color: var(--signal); font-weight: 700; }
.council { display: flex; align-items: center; gap: 8px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line); min-width: 0; }
.council img { width: 30px; height: 30px; object-fit: contain; display: block; }
.council span { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 4px; }
.nav-link { font-size: 14px; color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: var(--r-sm); background: none; border: none; cursor: pointer; white-space: nowrap; }
.nav-link:hover { background: var(--bg); color: var(--ink); }
.nav-link.current { color: var(--brand); font-weight: 600; background: var(--bg); }
.nav-link .short { display: none; }
@media (max-width: 560px) {
  .council span, .brand-word { display: none; }
  .council { padding-inline-start: 10px; }
  .nav-link { padding: 8px 7px; font-size: 13px; }
  .nav-link .full { display: none; }
  .nav-link .short { display: inline; }
  .app-header-inner { gap: 8px; padding: 10px 12px; }
  .user-wrap { margin-inline-start: 2px; }
  .user-btn { width: 30px; height: 30px; font-size: 14px; }
}

/* תפריט משתמש */
.user-wrap { position: relative; margin-inline-start: 6px; }
.user-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; display: grid; place-items: center; font-family: inherit; }
.user-btn:hover, .user-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--signal); }
.user-menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: 270px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(20,34,53,.14); padding: 6px; z-index: 70; }
.user-menu[hidden] { display: none; }
.um-head { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.um-head b { display: block; font-size: 14px; font-weight: 600; direction: ltr; text-align: right; word-break: break-all; }
.um-head small { font-size: 12px; color: var(--ink-2); }
.um-head:last-child { border-bottom: none; margin-bottom: 0; }
.um-av { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--bg); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.um-item { width: 100%; display: flex; gap: 10px; align-items: flex-start; text-align: right; padding: 10px; border: none; background: none; border-radius: var(--r-sm); cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); }
.um-item:hover { background: var(--bg); }
.um-item svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--brand); }
.um-item small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 2px; }

/* כפתורים */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-md); border: 1px solid var(--brand); background: var(--brand); color: #fff; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; touch-action: manipulation; }
.btn:hover { background: var(--brand-hover); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--field); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* פס מוכנות: 7 מקטעים לפי משקל הסעיף */
.strip { display: flex; gap: 3px; height: 10px; width: 100%; }
.strip .seg { position: relative; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.strip .seg i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; transition: width .35s ease; }
.strip.thin { height: 7px; gap: 2px; }
.strip.thin .seg, .strip.thin .seg i { border-radius: 2px; }

.c-ok { color: var(--ok); } .c-good { color: var(--good-ink); } .c-low { color: var(--low-ink); } .c-bad { color: var(--bad); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.good { background: var(--good-bg); color: var(--good-ink); }
.pill.low { background: var(--low-bg); color: var(--low-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }

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

/* מגמה בין בדיקות */
.delta { font-size: 13px; font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.delta.flat, .delta.none { color: var(--muted); font-weight: 400; }

.pill.none { background: var(--line-soft); color: var(--ink-2); }
