/* Assistant is served from this site: hospital networks often block Google Fonts. */
@font-face { font-family: Assistant; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/fonts/assistant-hebrew.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-display: swap; font-weight: 200 800; 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+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* אנשי המחלקה. Hebrew, RTL, laptop and phone. Light by default, dark when the device asks for it. Colours only through variables. */
:root {
  --bg: #f5f4f6; --card: #ffffff; --ink: #1d1a22; --muted: #625d6b; --line: #e3dfe7; --soft: #f7f3f6;
  --accent: #7b1b4e; --accent-ink: #ffffff; --accent-soft: #f6e6ee;
  --ok: #1b7a43; --ok-soft: #e4f4ea; --bad: #b3261e; --bad-soft: #fbe9e7; --goal: #1f6fb2; --goal-soft: #e5f1fb; --warn: #8a5300; --warn-soft: #fdf1e0;
  --senior: #b44d0c; --oncall: #17498c; --resident: #4c1d95; --feedback: #0b5454;
  --shadow: 0 1px 2px rgba(29, 26, 34, .06), 0 2px 8px rgba(29, 26, 34, .05);
  --r: 14px;
  --head: #7b1b4e; --head-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --bg: #25282c; --card: #2f3338; --ink: #eceef0; --muted: #a9b0b8; --line: #41464d; --soft: #363a40;
    --accent: #e48ab6; --accent-ink: #25282c; --accent-soft: #46283a;
    --ok: #7fd3a0; --ok-soft: #27412f; --bad: #f2a29b; --bad-soft: #4a2c2a; --goal: #8cc4f2; --goal-soft: #253a4d; --warn: #f2c27a; --warn-soft: #463a26;
    --senior: #f5a46a; --oncall: #8fb8ee; --resident: #c4a8f5; --feedback: #6fd0c6; --shadow: none; --head: #4a1530; --head-ink: #f6e9f0; }
}
:root[data-theme=dark] { --bg: #25282c; --card: #2f3338; --ink: #eceef0; --muted: #a9b0b8; --line: #41464d; --soft: #363a40;
    --accent: #e48ab6; --accent-ink: #25282c; --accent-soft: #46283a;
    --ok: #7fd3a0; --ok-soft: #27412f; --bad: #f2a29b; --bad-soft: #4a2c2a; --goal: #8cc4f2; --goal-soft: #253a4d; --warn: #f2c27a; --warn-soft: #463a26;
    --senior: #f5a46a; --oncall: #8fb8ee; --resident: #c4a8f5; --feedback: #6fd0c6; --shadow: none; --head: #4a1530; --head-ink: #f6e9f0; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Assistant, "Segoe UI", Arial, sans-serif; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
a { color: var(--accent); }
button { font: inherit; }
.boot { text-align: center; color: var(--muted); margin-top: 30vh; }
header.top { position: sticky; top: 0; z-index: 5; background: var(--head); color: var(--head-ink); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display: flex; align-items: center; gap: 10px; }
header.top img { width: 30px; height: 30px; border-radius: 8px; }
header.top .t { font-weight: 800; letter-spacing: .3px; }
header.top .s { font-size: 13px; opacity: .85; }
body { padding-bottom: 40px; }
main { max-width: 1100px; margin: 0 auto; padding: 14px; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; }
.card h2 { margin: 0 0 8px; font-size: 19px; }
.card h3 { margin: 14px 0 6px; font-size: 15px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 13px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 9px 16px; font-weight: 700; text-decoration: none; cursor: pointer; min-height: 40px; }
.btn.ghost { background: var(--soft); color: var(--ink); border: 1px solid var(--line); font-weight: 600; }
.btn.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); }
.btn.sm { padding: 4px 10px; min-height: 32px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--ink); min-width: 0; }
input[type=date] { padding: 6px 8px; }
textarea { width: 100%; min-height: 70px; }
label.f { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
label.f input, label.f select { width: 100%; color: var(--ink); }
.grid2 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sp { flex: 1; }
.msg { padding: 9px 12px; border-radius: 10px; background: var(--goal-soft); color: var(--goal); }
.msg.bad { background: var(--bad-soft); color: var(--bad); } .msg.ok { background: var(--ok-soft); color: var(--ok); } .msg.warn { background: var(--warn-soft); color: var(--warn); }
.login { max-width: 420px; margin: 8vh auto 0; }
.login .logo { width: 72px; height: 72px; border-radius: 18px; display: block; margin: 0 auto 10px; }
.login input { width: 100%; }
/* the toolbar and the list */
.tools { display: grid; gap: 10px; }
.tools input[type=search] { width: 100%; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 14px; }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.stat { display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); }
.stat b { color: var(--ink); font-size: 18px; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr.p { cursor: pointer; } tr.p:hover td { background: var(--soft); }
tr.former td { color: var(--muted); }
td.name b { display: block; }
.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); border: 1px solid var(--line); margin: 1px 0 1px 4px; white-space: nowrap; }
.chip.on { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.time { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.err { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.k-resident { color: var(--resident); } .chip.k-senior { color: var(--senior); } .chip.k-graduate { color: var(--feedback); }
/* one person */
.grant { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.grant:last-child { border-bottom: 0; }
.grant .t b { display: block; }
.grant .a { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
@media (max-width: 600px) { .grant { grid-template-columns: minmax(0, 1fr); } .grant .a { justify-content: flex-start; } th.hide, td.hide { display: none; } }
.dlg { position: fixed; inset: 0; background: rgba(20, 16, 24, .45); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px; z-index: 20; overflow-y: auto; }
.dlg .card { width: min(720px, 100%); }
.mailbox { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f5f4f6; }
.mailbox iframe { width: 100%; height: 520px; border: 0; display: block; background: #f5f4f6; }
