/* =============================================================================
   ניהול בית הכנסת — עיצוב RTL, מובייל/טאבלט/דסקטופ
   ========================================================================== */
:root {
  --brand: #2f6f6a;
  --brand-dark: #234f4b;
  --brand-700: #2a605b;
  --brand-50: #eef5f3;
  --brand-100: #d9e9e5;
  --gold: #8a6a2f;
  --gold-deep: #6e5220;
  --gold-bg: #f4ecdc;
  --gold-line: #d3bd8c;
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1f2d2b;
  --muted: #5f6b67;
  --border: #e2e4dd;
  --border-strong: #cfd6d0;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --amber: #b45309;
  --amber-bg: #fef3c7;
  --green: #15803d;
  --green-bg: #dcfce7;
  --purple: #6d28d9;
  --purple-bg: #ede9fe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 3px rgba(31, 45, 43, .07), 0 1px 2px rgba(31, 45, 43, .04);
  --shadow-lg: 0 14px 36px rgba(31, 45, 43, .14);
  --header-h: 52px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--text);
  font-family: "Assistant", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  direction: rtl; font-size: 16px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
body.no-scroll { overflow: hidden; }
a { color: var(--brand-700); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }
.app-loading { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-size: 1.1rem; }
.serif { font-family: "Frank Ruhl Libre", "Assistant", serif; }

/* ---------- logo ---------- */
.logo-banner {
  display: block; width: 100%; border-radius: var(--radius);
  border: 1px solid var(--gold-line); box-shadow: var(--shadow);
  margin-bottom: .9rem; overflow: hidden; background: var(--brand-dark);
}
.logo-banner img { display: block; width: 100%; height: auto; }
.login-logo {
  width: 100%; max-width: 420px; border-radius: 12px; border: 1px solid var(--gold-line);
  box-shadow: var(--shadow-lg); margin-bottom: 1rem;
}

/* ---------- header ---------- */
.app-header {
  position: sticky; top: 0; z-index: 60;
  background: linear-gradient(180deg, #357a74 0%, var(--brand) 60%, var(--brand-dark) 100%);
  color: #fff;
  height: var(--header-h);
  display: flex; align-items: center; gap: .5rem;
  padding: 0 .7rem;
  border-bottom: 2px solid var(--gold-line);
}
.app-header .menu-btn {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  color: #fff; width: 38px; height: 38px; border-radius: 10px;
  display: inline-grid; place-items: center; cursor: pointer; flex: none;
}
.app-header .menu-btn svg { width: 20px; height: 20px; }
.app-header .brand { font-weight: 800; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; min-width: 0; }
.app-header .brand .stm {
  background: linear-gradient(160deg, #f4d98b, var(--gold-line) 55%, #a9832f);
  color: var(--brand-dark); width: 28px; height: 28px; border-radius: 8px;
  display: inline-grid; place-items: center; flex: none; font-size: 1rem;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset;
}
.app-header .brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: "Frank Ruhl Libre", "Assistant", serif; letter-spacing: .2px; }
.app-header .spacer { flex: 1; }
.app-header .hdate { font-size: .82rem; opacity: .95; white-space: nowrap; }
.sync-pill {
  display: inline-flex; align-items: center; gap: .35rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  padding: .28rem .5rem; border-radius: 999px; font-size: .76rem; cursor: pointer; flex: none;
}
.role-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff;
  padding: .28rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; cursor: pointer; flex: none;
}
.role-pill.on { background: var(--gold-line); border-color: var(--gold-line); color: var(--brand-dark); }
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.sync-pill.on .dot { background: #4ade80; }
.sync-pill.err .dot { background: #f87171; }
.sync-pill.syncing .dot { background: #fde047; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* ---------- layout / sidebar ---------- */
.layout { display: flex; min-height: calc(100vh - var(--header-h)); }
.sidebar {
  width: 240px; flex: none; background: var(--card); border-inline-start: 1px solid var(--border);
  padding: .6rem; position: sticky; top: var(--header-h); align-self: flex-start;
  height: calc(100vh - var(--header-h)); overflow-y: auto;
}
.sidebar .nav-group { font-size: .72rem; font-weight: 700; color: var(--muted); padding: .8rem .6rem .3rem; letter-spacing: .3px; }
.sidebar a {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .6rem; border-radius: 10px;
  color: var(--text); font-weight: 600; font-size: .95rem; margin-bottom: 2px;
}
.sidebar a .ic { width: 20px; text-align: center; flex: none; opacity: .8; }
.sidebar a.active { background: var(--brand-50); color: var(--brand-dark); }
.sidebar a:hover { background: var(--bg); }
.sidebar a .badge { margin-inline-start: auto; background: var(--red); color: #fff; font-size: .72rem; padding: .05rem .4rem; border-radius: 999px; }

.scrim { display: none; }
.content { flex: 1; min-width: 0; }
.container { max-width: 1000px; margin: 0 auto; padding: 1.1rem 1rem 5rem; }

@media (min-width: 901px) { .app-header .menu-btn { display: none; } }

/* ---------- page ---------- */
.page-head { display: flex; align-items: flex-start; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; }
.page-head p.sub { color: var(--muted); margin: .15rem 0 0; font-size: .9rem; width: 100%; }
.page-head .spacer { flex: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem; justify-content: center;
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: .55rem .9rem; border-radius: var(--radius-sm); font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand-dark); }
.btn.ghost:hover { background: var(--brand-50); }
.btn.subtle { background: var(--bg); color: var(--text); border-color: var(--border-strong); }
.btn.subtle:hover { background: #e9ecef; }
.btn.danger { background: var(--red); border-color: var(--red); }
.btn.danger:hover { filter: brightness(.92); }
.btn.sm { padding: .35rem .6rem; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  background: transparent; border: 1px solid var(--border-strong); color: var(--muted);
  width: 34px; height: 34px; border-radius: 9px; display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 1rem; }
.card + .card { margin-top: .9rem; }
.card-title { font-size: 1.05rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.card-title .spacer { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.stack > * + * { margin-top: .8rem; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- stat tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .7rem; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem .9rem; box-shadow: var(--shadow); }
.tile .k { color: var(--muted); font-size: .82rem; font-weight: 600; }
.tile .v { font-size: 1.5rem; font-weight: 800; margin-top: .1rem; }
.tile .v small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.tile.link { cursor: pointer; }
.tile.link:hover { border-color: var(--brand-100); background: var(--brand-50); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; background: var(--card); font-size: .92rem; }
table.data th, table.data td { text-align: right; padding: .6rem .7rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--bg); font-weight: 700; color: #374151; position: sticky; top: 0; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.clickable { cursor: pointer; }
table.data tr.clickable:hover td { background: var(--brand-50); }
table.data td.actions { width: 1%; }
table.data .wrap { white-space: normal; min-width: 160px; }
.empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem; }
.empty svg { width: 42px; height: 42px; opacity: .4; margin-bottom: .5rem; }

/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem;
  border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--bg); color: #374151;
  border: 1px solid var(--border-strong);
}
.chip.red { background: var(--red-bg); color: #991b1b; border-color: #fecaca; }
.chip.amber { background: var(--amber-bg); color: #92400e; border-color: #fde68a; }
.chip.green { background: var(--green-bg); color: #166534; border-color: #bbf7d0; }
.chip.blue { background: var(--brand-100); color: var(--brand-dark); border-color: var(--gold-line); }
.chip.purple { background: var(--purple-bg); color: #5b21b6; border-color: #ddd6fe; }
.chip.gray { background: #f3f4f6; }

/* ---------- forms ---------- */
.field { margin-bottom: .8rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field .hint { color: var(--muted); font-size: .8rem; margin-top: .25rem; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field input[type=number],
.field input[type=date], .field input[type=time], .field select, .field textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--brand-100); border-color: var(--brand); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.field-row.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .field-row, .field-row.three { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.check input { width: 18px; height: 18px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { background: #fff; border: 0; padding: .45rem .8rem; cursor: pointer; font-weight: 600; color: var(--muted); border-inline-start: 1px solid var(--border-strong); }
.seg button:first-child { border-inline-start: 0; }
.seg button.active { background: var(--brand); color: #fff; }

/* ---------- modal ---------- */
.modal-scrim {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 3vh 1rem 1rem; overflow-y: auto;
}
.modal {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; margin-bottom: 3vh;
}
.modal.wide { max-width: 800px; }
.modal-head { display: flex; align-items: center; gap: .5rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; font-size: 1.1rem; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 1rem; }
.modal-foot { padding: .8rem 1rem; border-top: 1px solid var(--border); display: flex; gap: .6rem; justify-content: flex-start; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }

/* ---------- toast ---------- */
.toasts { position: fixed; inset-block-end: 1rem; inset-inline-start: 50%; transform: translateX(50%); z-index: 200; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.toast { background: #111827; color: #fff; padding: .6rem 1rem; border-radius: 999px; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-lg); animation: toast-in .2s ease; }
.toast.ok { background: #15803d; }
.toast.err { background: #b91c1c; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- misc ---------- */
.divider { height: 1px; background: var(--border); margin: .9rem 0; }
.list-row { display: flex; align-items: center; gap: .7rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.list-row:last-child { border-bottom: 0; }
.list-row .lead { font-weight: 700; }
.list-row .spacer { flex: 1; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-100); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; flex: none; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem .8rem; font-size: .93rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

.zmanim-list { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .9rem; }
@media (max-width: 480px) { .zmanim-list { grid-template-columns: 1fr; } }
.zmanim-list .z { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px dashed var(--border); }
.zmanim-list .z b { font-variant-numeric: tabular-nums; }

/* calendar */
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { padding: .4rem 0; font-size: .8rem; color: var(--muted); }
.cal td { border: 1px solid var(--border); height: 84px; vertical-align: top; padding: .25rem; position: relative; }
.cal td.other { background: var(--bg); }
.cal td.today { background: var(--brand-50); outline: 2px solid var(--brand); }
.cal .dn { font-weight: 700; font-size: .85rem; }
.cal .dh { font-size: .72rem; color: var(--muted); }
.cal .ev { font-size: .68rem; background: var(--brand-100); color: var(--brand-dark); border-radius: 5px; padding: 0 .2rem; margin-top: .1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.hol { background: var(--gold-bg); color: #92400e; }
.cal .ev.yz { background: var(--purple-bg); color: #5b21b6; }
.cal .ev.ev2 { background: var(--green-bg); color: #166534; }
.cal .ev.par { background: var(--brand-100); color: var(--brand-dark); }
@media (max-width: 640px) { .cal { min-width: 480px; } .cal td { height: 62px; } .cal .ev { font-size: .6rem; } }

/* ---------- seat map ---------- */
.hall { min-width: 640px; }
.hall-top { display: grid; grid-template-columns: auto max-content auto; gap: 1rem; align-items: start; justify-content: center; }
.hall-mid { display: flex; justify-content: center; margin: .9rem 0; }
.hall-bottom { display: flex; justify-content: center; margin-top: .9rem; }
.hall-tables { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: .9rem; }
.hall-ezrat { margin-top: 1rem; padding-top: .9rem; border-top: 2px dashed var(--gold-line); display: flex; flex-wrap: wrap; gap: 1.4rem; justify-content: center; }
.hall-ezrat .sec-title { color: var(--brand-dark); font-size: .85rem; }
.hall-label { border: 2px solid var(--brand); color: var(--brand-dark); background: var(--brand-50); border-radius: 10px; font-weight: 800; padding: .5rem .9rem; text-align: center; white-space: nowrap; }
.hall-label.ark { align-self: start; background: linear-gradient(180deg, var(--brand-50), #f3e4e4); border-color: var(--gold-line); }
.hall-label.bimah { border-color: var(--gold-line); color: var(--gold-deep); background: var(--gold-bg); }
/* עמודת מרכז: ארון + חזן/רב + מרכז לפני הבימה + בימה + מרכז אחרי הבימה */
.center-col { display: flex; flex-direction: column; align-items: center; gap: .8rem; }
.center-col .hall-mid { margin: 0; }
.ark-group { display: flex; gap: .5rem; align-items: flex-start; }
.ark-flank {
  min-width: 78px; min-height: 58px; align-self: start;
  border: 2px solid var(--gold-line); border-radius: 10px; background: #fffdf6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: .3rem .4rem; cursor: pointer; font: inherit; text-align: center;
}
.ark-flank:hover { background: var(--gold-bg); }
.ark-flank.paid { background: var(--green-bg); border-color: #86c99b; }
.ark-flank.sold { background: var(--amber-bg); border-color: #e6c260; }
.ark-flank.taken { background: #eceae7; border-color: var(--border-strong); }
.ark-flank .role { font-size: .7rem; font-weight: 800; color: var(--gold-deep); }
.ark-flank .sb { font-size: .68rem; color: var(--muted); line-height: 1.05; }
.ark-flank .sa { font-size: .66rem; font-weight: 700; color: var(--green); }
.sec-wrap { display: inline-block; }
.sec-title { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; text-align: center; }
.zone-rows { display: flex; flex-direction: column; gap: .3rem; }
.seat-row { display: flex; gap: .3rem; align-items: stretch; justify-content: center; }
.row-del {
  border: 0; background: transparent; color: var(--red); font-weight: 700; cursor: pointer;
  width: 20px; align-self: center; flex: none; opacity: .5;
}
.row-del:hover { opacity: 1; }
.seat {
  min-height: 52px; width: 66px; flex: none; border: 1px solid var(--border-strong); border-radius: 8px; background: #fff;
  padding: .2rem .25rem; cursor: pointer; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 1px; font: inherit; text-align: center; overflow: hidden;
}
.seat:hover { border-color: var(--brand); background: var(--brand-50); }
.seat.blocked { visibility: hidden; }
.seat.sold { background: var(--amber-bg); border-color: #fde68a; }
.seat.paid { background: var(--green-bg); border-color: #bbf7d0; }
.btn.is-hidden { opacity: .6; }
.seat.taken { background: #eceae7; border-color: var(--border-strong); color: var(--muted); }
.seat.taken:hover { background: #e4e1dd; border-color: var(--border-strong); }
.seat.req, .ark-flank.req { background: var(--amber-bg); border: 2px dashed #e0a52e; }
.seat .sn { font-size: .74rem; font-weight: 700; line-height: 1.1; }
.seat .sb { font-size: .66rem; color: var(--muted); line-height: 1.05; }
.seat .sa { font-size: .66rem; font-weight: 700; color: var(--green); }
.seat .rq, .ark-flank .rq { font-size: .58rem; font-weight: 700; color: #b06d00; line-height: 1; }

/* print */
@media print {
  .app-header, .sidebar, .scrim, .no-print, .btn, .icon-btn { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff; }
  table.data th { position: static; }
  .cal { min-width: 0; }
  /* seat map: fit to page */
  .hall { min-width: 0; width: 100%; }
  .seat { min-height: 34px; width: 60px; }
  .seat:hover { background: #fff; }
  .row-del { display: none !important; }
  .card.pad { overflow: visible !important; padding: 0 !important; border: 0 !important; }
  .hall-label { border-color: #999; background: #f3f3f3 !important; color: #000; }
  .ark-flank { border-color: #999; }
  .seat.paid, .ark-flank.paid { background: #e8f5e9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .seat.sold, .ark-flank.sold { background: #fff4e0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .seat.req, .ark-flank.req { border: 1px solid #999 !important; background: #fff !important; }
  .seat .rq, .ark-flank .rq { display: none !important; }
  .logo-banner { max-width: 340px; }
  @page { margin: 12mm; }
}

/* הערה: לוח התורמים השבועי להדפסה (חסויות שבת) נבנה כעת כעמוד עצמאי בחלון/לשונית נפרדים
   (ראה printPoster ב-modules2.js) עם עיצוב מוטמע משלו — לא תלוי בכללי ה-CSS כאן. */

/* ---------- mobile / tablet (overrides — must come last) ---------- */
@media (max-width: 900px) {
  .layout { display: block; }
  .content { width: 100%; }
  .sidebar {
    position: fixed; top: var(--header-h); right: 0; left: auto;
    width: min(300px, 86vw); z-index: 80;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    padding-bottom: 3rem;
    border: 0; border-inline-start: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    display: none;
  }
  body.nav-open .sidebar { display: block; }
  body.nav-open { overflow: hidden; }
  body.nav-open .scrim {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,.45); z-index: 70;
  }
  .sidebar a { padding: .5rem .55rem; font-size: .92rem; margin-bottom: 1px; }
  .sidebar .nav-group { padding: .45rem .55rem .2rem; }
  .container { padding: .9rem .8rem 5rem; max-width: 100%; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg, .icon-btn img { width: 19px; height: 19px; }
  .page-head h1 { font-size: 1.25rem; }
  .page-head { gap: .5rem; }
  .card.pad { padding: .85rem; }
  table.data th, table.data td { padding: .55rem .5rem; font-size: .9rem; }
  .modal-scrim { padding: 0; align-items: stretch; }
  .modal { max-width: none; margin: 0; border-radius: 0; min-height: 100%; }
  .modal-head { position: sticky; top: 0; background: var(--card); z-index: 1; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(46%, 1fr)); }
  .btn { padding: .6rem .9rem; }
  .btn.sm { padding: .5rem .75rem; font-size: .88rem; }
  .seg button { padding: .55rem .75rem; }
  .field-row, .field-row.three { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .app-header .hdate { display: none; }
}
@media (max-width: 430px) {
  .sync-pill .lbl { display: none; }
  .app-header .brand { font-size: .95rem; min-width: 0; }
  .app-header .brand b { max-width: 40vw; }
  .role-pill { padding: .28rem .5rem; }
}

/* ---------- seat map on phones: stack in order, no side-scroll ---------- */
@media (max-width: 760px) {
  .hall { min-width: 0; width: 100%; }
  .hall-top { display: flex; flex-direction: column; gap: 1.3rem; align-items: center; }
  /* פירוק עמודת המרכז — כל חלק הופך לפריט עצמאי בערימה */
  .center-col { display: contents; }
  .center-col > .ark-group { order: 0; flex-wrap: wrap; justify-content: center; }
  .hall-top > .zone-right { order: 1; }
  .hall-top > .zone-left { order: 2; }
  .center-col > .zone-front { order: 3; }
  .center-col > .hall-mid { order: 4; margin: 0; }
  .center-col > .zone-back { order: 5; }
  .hall-ezrat { gap: .9rem; }
  .sec-wrap { display: block; width: 100%; }
  .seat-row { flex-wrap: wrap; }
  .seat { width: 56px; min-height: 44px; }
  .seat .sn { font-size: .72rem; }
  .ark-flank { min-width: 66px; min-height: 50px; }
}

/* גבאי רגוע — פס מצב מנוי */
.sub-banner{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:.8rem auto 0;max-width:1180px;padding:.6rem .9rem;border-radius:12px;background:var(--gold-bg,#fbf3dc);border:1px solid #e4cf8f;font-size:.9rem}
.sub-banner.warn{background:#fdecea;border-color:#f1b0a8}
.logo-text-banner{background:linear-gradient(160deg,#2f6f6a,#234f4b);color:#f6f4ef;text-align:center;padding:1.4rem 1rem;border-radius:14px;font-family:"Frank Ruhl Libre",serif}
.logo-text-banner b{display:block;font-size:1.9rem;line-height:1.2}
.logo-text-banner span{display:block;font-size:.95rem;color:#e9d8b4;margin-top:.3rem}
.sub-banner.demo{background:#eef4ff;border-color:#b9ccf2}
.sub-banner.demo.on{background:#e9f7ef;border-color:#9fd3b4}
.sub-banner.demo .small{margin-top:.15rem;color:var(--muted,#6f6254)}
/* מפת מקומות — שורות צמודות לבימה + כלי שורה */
.hall-mid { gap: .8rem; align-items: center; flex-wrap: wrap; }
.hall-mid > .sec-wrap { margin: 0; }
.row-plus, .row-minus { font-weight: 800; }
button.seat.blocked { cursor: pointer; }
@media (max-width: 760px) { .hall-mid { flex-direction: column; } }

/* נגישות: סימון ברור של הרכיב הפעיל במקלדת + דילוג לתוכן */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #1f5fbf; outline-offset: 2px; }
.skip-link { position: absolute; inset-inline-start: -9999px; top: 6px; z-index: 1000; background: #fff; color: #234f4b; padding: .5rem 1rem; border-radius: 8px; font-weight: 700; border: 2px solid #1f5fbf; }
.skip-link:focus { inset-inline-start: 8px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* גבאי רגוע: סמל בכותרת */
.brand .stm-img { width: 26px; height: 26px; border-radius: 7px; display: block; background: #f6f4ef; }
