/* עיצוב משותף למסכי העמדות והניהול */
:root {
  --navy: #1f3a5f; --navy-2: #2b4c78; --gold: #b8862b; --gold-soft: #fbf1dc;
  --bg: #f3f5f8; --card: #ffffff; --ink: #1b2430; --muted: #5a6472; --line: #d6dce6;
  --ok: #1e8e5a; --ok-soft: #e4f6ec; --warn: #b96a00; --warn-soft: #fdf1dc; --bad: #c0392b; --bad-soft: #fbe6e3;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Segoe UI", "Heebo", "Arial", sans-serif; background: var(--bg); color: var(--ink); direction: rtl; font-size: 16px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.bar { background: var(--navy); color: #fff; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 4px solid var(--gold); }
.bar-title { font-size: 20px; font-weight: 700; }
.bar-sub { font-size: 14px; opacity: .85; }
.wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 60px; }
.wide { max-width: 1320px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.big-input { width: 100%; font-size: 26px; padding: 14px 18px; border: 2px solid var(--line); border-radius: 12px; background: #fff; outline: none; }
.big-input:focus { border-color: var(--navy-2); }
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select, .field textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }

.btn { border: 0; border-radius: 10px; padding: 11px 20px; font-weight: 600; cursor: pointer; background: var(--navy); color: #fff; }
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.gold { background: var(--gold); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn.xl { font-size: 22px; padding: 16px 28px; }
.link { background: none; border: 0; color: var(--navy-2); text-decoration: underline; cursor: pointer; padding: 6px 0; }

.results { margin-top: 12px; display: grid; gap: 8px; }
.res { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: right; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; }
.res:hover, .res:focus { border-color: var(--navy-2); outline: none; }
.res-name { font-size: 20px; font-weight: 700; }
.res-meta { color: var(--muted); font-size: 14px; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #e9edf3; color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.gold { background: var(--gold-soft); color: #7a5712; }

.hero { text-align: center; border-radius: 16px; padding: 34px 20px; }
.hero h1 { margin: 0 0 6px; font-size: 44px; }
.hero .sub { font-size: 24px; }
.hero.ok { background: var(--ok-soft); color: #11613c; border: 2px solid var(--ok); }
.hero.warn { background: var(--warn-soft); color: #7a4700; border: 2px solid var(--warn); }
.hero.bad { background: var(--bad-soft); color: #8e241a; border: 2px solid var(--bad); }
.hero.idle { background: #fff; border: 2px dashed var(--line); color: var(--muted); }
.table-no { font-size: 84px; font-weight: 800; line-height: 1; margin: 10px 0; }
.msg { margin-top: 12px; padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.msg.bad { background: var(--bad-soft); color: var(--bad); }
.msg.ok { background: var(--ok-soft); color: var(--ok); }
.muted { color: var(--muted); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* חלון כניסה / דיאלוג */
.overlay { position: fixed; inset: 0; background: rgba(15, 25, 40, .6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.dialog { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 420px; max-height: 92vh; overflow: auto; }
.dialog h2 { margin: 0 0 12px; font-size: 20px; color: var(--navy); }
.cam video { width: 100%; border-radius: 10px; background: #000; }

/* מדבקת שולחן: מוצגת רק בהדפסה */
.label-print { display: none; }
@media print {
  body.station > *:not(.label-print) { display: none !important; }
  body.station { background: #fff; }
  .label-print { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100vw; height: 100vh; overflow: hidden; text-align: center; }
  .label-print .l-word { font-size: 4mm; }
  .label-print .l-num { font-size: 15mm; font-weight: 800; line-height: 1; }
  .label-print .l-name { font-size: 3.4mm; max-width: 96%; white-space: nowrap; overflow: hidden; }
}

/* ניהול */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 16px 0; flex-wrap: wrap; }
.tab { background: none; border: 0; padding: 10px 18px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab.on { color: var(--navy); border-bottom-color: var(--gold); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat b { display: block; font-size: 26px; color: var(--navy); }
.stat span { font-size: 13px; color: var(--muted); }
table.grid { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
table.grid th { background: var(--navy); color: #fff; text-align: right; padding: 9px 10px; font-weight: 600; position: sticky; top: 0; }
table.grid td { padding: 8px 10px; border-top: 1px solid #e8ecf2; white-space: nowrap; }
table.grid tbody tr { cursor: pointer; }
table.grid tbody tr:hover { background: #f4f7fb; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 240px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 8px 12px; cursor: pointer; font-size: 14px; }
.seg button.on { background: var(--navy); color: #fff; }
.section { margin-bottom: 18px; }
.section h3 { margin: 0 0 10px; color: var(--navy); font-size: 17px; }
.mono { font-family: Consolas, monospace; direction: ltr; unicode-bidi: plaintext; }
.scroll { overflow: auto; max-height: 68vh; border-radius: 12px; }
