:root {
  /* צבעים לפי הלוגו: בורדו, זהב וקרם */
  --bg: #f7f1e6;
  --surface: #fffdf8;
  --ink: #2a1d1a;
  --muted: #7a6a5c;
  --line: #e8dcc4;
  --accent: #7a1219;
  --accent-ink: #fff8ea;
  --accent-soft: #f6e5d5;
  --gold: #c9a23f;
  --gold-soft: #f3e3b8;
  --warn-soft: #fbefcd;
  --danger: #a3261f;
  --chip: #f1e7d3;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1414;
    --surface: #241b1b;
    --ink: #f3e9dc;
    --muted: #b3a291;
    --line: #3d2e2b;
    --accent: #e0b860;
    --accent-ink: #2a1210;
    --accent-soft: #3a2422;
    --gold: #e0b860;
    --gold-soft: #4a3b20;
    --warn-soft: #3d3220;
    --danger: #ff8a80;
    --chip: #33262420;
    color-scheme: dark;
  }
  :root { --chip: #332624; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 'Heebo', system-ui, sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.spacer { flex: 1; }

/* כפתורים */
.btn {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.danger { color: var(--danger); }
.btn.big { padding: 12px 22px; font-size: 17px; }

/* התחברות */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
  max-width: 380px;
  width: 100%;
}
.login-card h1 { margin: 6px 0 0; font-size: 28px; color: var(--accent); }
.login-logo { width: 100%; max-width: 240px; height: auto; display: block; margin: 0 auto; }
.login-card { border-top: 4px solid var(--gold); }
.login-card .hint { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* סרגל עליון */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 16px;
  background: var(--surface);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 5;
}
.brand { color: var(--accent); font-size: 18px; display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 48px; width: auto; }

.page { max-width: 1100px; margin: 0 auto; padding: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
#search {
  flex: 1 1 320px;
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
select, input, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
}
.check { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
input[type="checkbox"] { width: auto !important; margin: 0; accent-color: var(--accent); }

/* רשימה */
.list { display: flex; flex-direction: column; gap: 6px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  text-align: start;
  font: inherit;
  color: inherit;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
}
.row:hover { border-color: var(--accent); }
.row.missing-en { background: var(--warn-soft); }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-name { font-weight: 500; unicode-bidi: plaintext; text-align: right; }
html[dir="ltr"] .row-name { text-align: left; }
.row-en { color: var(--muted); font-size: 13px; text-align: left; }
.row-city { color: var(--muted); }
.row-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

.chip {
  display: inline-block;
  font: inherit;
  font-size: 12px;
  background: var(--chip);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 2px 10px;
}
button.chip { cursor: pointer; }
.chip.toggle.on { background: var(--accent); color: var(--accent-ink); }
.chip.add { background: transparent; border: 1px dashed var(--muted); color: var(--muted); }
.badge {
  font-size: 11px; font-weight: 500;
  background: var(--accent-soft); color: var(--accent);
  border-radius: 6px; padding: 1px 6px; margin-inline-start: 4px;
}
.badge.muted { background: var(--chip); color: var(--muted); }

/* חלונות */
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  padding: 20px;
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}
dialog.wide { width: min(860px, calc(100vw - 32px)); }
dialog.small { width: min(400px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(10, 14, 22, .45); }
dialog h2 { margin: 0 0 4px; }
dialog h3 { margin: 16px 0 6px; font-size: 15px; color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 12px; }
.meta { color: var(--muted); font-size: 12px; margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.addr { margin: 0; text-align: left; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.kv > span:first-child { color: var(--muted); }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* טופס */
fieldset { border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; padding: 10px 14px 14px; }
legend { padding: 0 6px; font-weight: 500; color: var(--accent); }
fieldset { border-top: 2px solid var(--gold-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; }
.grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.grid label.check { flex-direction: row; justify-content: flex-start; align-items: center; color: var(--ink); font-size: 15px; padding-bottom: 8px; }
.grid label.wide { grid-column: 1 / -1; }
label > input, label > select, label > textarea, .ac-wrap input { color: var(--ink); width: 100%; }
fieldset > label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.contact-line { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: end; padding: 6px 0; border-bottom: 1px solid var(--line); }
.contact-line label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* השלמת כתובות */
.ac-wrap { position: relative; display: block; }
.ac-list {
  position: absolute; inset-inline: 0; top: 100%; z-index: 10;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.ac-list button {
  font: inherit; text-align: left; padding: 8px 10px;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.ac-list button:hover { background: var(--accent-soft); }

#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 10px; z-index: 50;
  max-width: calc(100vw - 32px);
}
#toast[data-kind="error"] { background: var(--danger); color: #fff; }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: 4px; }
  .contact-line { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  #user-email { display: none; }
}

/* בחירת שפה */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  font: inherit; font-size: 13px; border: 0; background: transparent; color: var(--muted);
  padding: 4px 12px; cursor: pointer;
}
.lang-switch button.on { background: var(--accent); color: var(--accent-ink); }
.login-card .lang-switch { margin-top: 14px; }

.hint-line { margin: -2px 0 8px; font-size: 12px; color: var(--muted); }
.status-row { margin-top: 10px; }

.check-with-note { display: flex; flex-direction: column; gap: 2px; align-self: end; }
.check-with-note .hint-line { margin: 0; }
fieldset > label.neshei-row, .neshei-row {
  flex-direction: row;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-top: 14px; padding: 10px; border: 1px dashed var(--line); border-radius: var(--radius);
  cursor: pointer; font-size: 15px; color: var(--ink);
}
.neshei-row img { height: 60px; width: auto; }

.wife-title { display: flex; flex-direction: column; gap: 6px; align-self: end; padding-bottom: 6px; }
.wife-title .check { font-size: 15px; color: var(--ink); }
input[type="radio"] { width: auto !important; margin: 0; accent-color: var(--accent); }

/* משפחה */
.family-row .icon-btn {
  font: inherit; font-size: 12px; background: none; border: 0; color: var(--muted);
  cursor: pointer; margin-inline-start: 8px; padding: 2px 6px; border-radius: 6px;
}
.family-row .icon-btn:hover { color: var(--danger); background: var(--chip); }
.add-family { margin-top: 10px; }
.add-family summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.add-family-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-top: 10px; }
.add-family-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.add-family-row label.grow { flex: 1 1 220px; }

/* מילוי אוטומטי שעוד לא נבדק */
input.suggested { color: var(--muted); font-style: italic; background: var(--chip); }
.unverified { color: var(--muted); font-style: italic; }
select.suggested { color: var(--muted); font-style: italic; background: var(--chip); }
.area-field { font-weight: 500; }

/* ארגונים */
.org-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.org-label { font-size: 13px; color: var(--muted); }
.org-item { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kollel-pick { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted);
  background: var(--chip); border-radius: 999px; padding: 3px 12px; }
.kollel-pick[hidden] { display: none; }
.check.small { font-size: 13px; color: var(--ink); }
.badge.org { background: var(--gold-soft); color: var(--ink); }
.org-select { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

/* גלילה מרובת-בחירה */
details.multi { position: relative; }
details.multi summary {
  list-style: none; cursor: pointer; color: var(--ink); font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 28px 7px 9px; background: var(--surface);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
details.multi summary::-webkit-details-marker { display: none; }
details.multi summary::after { content: "▾"; position: absolute; inset-inline-end: 9px; color: var(--muted); }
html[dir="rtl"] details.multi summary { padding: 7px 9px 7px 28px; }
details.multi[open] summary { border-color: var(--accent); }
.multi-list {
  position: absolute; z-index: 20; inset-inline: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 6px; display: flex; flex-direction: column; gap: 2px;
  max-height: 240px; overflow: auto;
}
.multi-list .check { padding: 5px 6px; border-radius: 6px; color: var(--ink); font-size: 14px; white-space: normal; }
.multi-list .check:hover { background: var(--chip); }

/* כפתור ✕ בפינה, תמיד נראה */
dialog { position: relative; }
.x-close {
  position: sticky; top: 0; float: inline-end; z-index: 5;
  font: inherit; font-size: 16px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  margin-inline-start: 8px;
}
.x-close:hover { color: var(--accent); border-color: var(--accent); }
.form-family .add-family-row { margin-top: 6px; }
fieldset > textarea { width: 100%; }

/* לשוניות */
.tabs { display: flex; gap: 4px; max-width: 1100px; margin: 0 auto; padding: 12px 16px 0; }
.tabs button {
  font: inherit; font-size: 16px; font-weight: 500; border: 1px solid var(--line); border-bottom: 0;
  background: transparent; color: var(--muted); padding: 8px 22px; border-radius: 10px 10px 0 0; cursor: pointer;
}
.tabs button.on { background: var(--surface); color: var(--accent); border-color: var(--gold); }

/* נדבות */
.don-row { grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) auto; }
.don-amount { font-weight: 700; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; direction: ltr; }
.badge.paid { background: #e3f1e4; color: #2e6b34; }
.badge.unpaid { background: #fbe3e1; color: var(--danger); }
.unpaid-text { color: var(--danger); }
.small { font-size: 12px; }
.list.compact .row { padding: 6px 10px; }
.card-donations .list { margin: 6px 0 10px; }
.small-btn { font-size: 13px; padding: 5px 12px; }
.heb-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.heb-picker select { flex: 1 0 auto; min-width: 4.5em; padding-inline-end: 1.8em; }
.heb-picker .hp-m { min-width: 6em; }
fieldset > label.wide { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .badge.paid { background: #23402a; color: #9fd8a6; }
  .badge.unpaid { background: #4a2422; }
}
@media (max-width: 640px) {
  .don-row { grid-template-columns: 1fr; }
}

/* לשוניות בתוך הכרטיס האישי */
.card-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gold); margin: 10px 0 14px; flex-wrap: wrap; }
.card-tabs button { background: none; border: 1px solid transparent; border-bottom: none; border-radius: 10px 10px 0 0;
  padding: 8px 14px; font: inherit; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.card-tabs button.on { background: var(--surface); color: var(--accent); border-color: var(--gold); font-weight: 600; }
.count-pill { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 9px; background: var(--gold); color: #fff; font-size: 11px; line-height: 1.5; text-align: center; }
.card-pane { min-height: 220px; }
.card-pane .muted { color: var(--muted); font-size: 14px; }

/* טופס נדבה מהיר */
.don-quick { display: flex; flex-direction: column; gap: 14px; margin-bottom: 12px; }
.donor-line { display: flex; align-items: baseline; gap: 10px; font-size: 18px; }
.linkish { background: none; border: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.amount-line { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.amount-box { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.amount-wrap { display: flex; align-items: center; gap: 4px; direction: ltr; font-size: 22px; color: var(--text, inherit); }
.amount-wrap input { font-size: 22px; width: 9em; padding: 6px 10px; }
.paid-toggle { font-size: 17px; padding-bottom: 8px; }
.paid-toggle input { width: 20px; height: 20px; }
.quick-block { display: flex; flex-direction: column; gap: 6px; }
.quick-label { font-size: 13px; color: var(--muted); }
.date-line { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
details.more { border-top: 1px dashed var(--gold); padding-top: 10px; margin-bottom: 8px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* מאורעות */
.occ-row { align-items: center; }
.occ-when { display: flex; flex-direction: column; min-width: 9.5em; gap: 2px; }
.occ-row.is-today { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.chip-yz { background: #2b2b2b; color: #fff; }
.type-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio span { display: inline-block; padding: 6px 16px; border-radius: 18px; border: 1px solid var(--gold); cursor: pointer; font-size: 15px; }
.chip-radio input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.name-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.name-line label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.adar-line { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.print-only { display: none; }
@media print {
  .topbar, .tabs, .side-menu, .toolbar, #occ-summary, dialog, .toast { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .occ-row { break-inside: avoid; border: none; border-bottom: 1px solid #ccc; border-radius: 0; }
}

/* קוויטל */
.kvitel-text { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--gold); border-radius: 10px;
  padding: 12px 14px; font-size: 16px; line-height: 1.7; margin-bottom: 8px; }
#kvitel-input { width: 100%; min-height: 10em; font: inherit; font-size: 16px; line-height: 1.7; padding: 10px 12px;
  border: 1px solid var(--gold); border-radius: 10px; resize: vertical; box-sizing: border-box; }
.kvitel-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.occ-row .row-main { flex: 1; min-width: 0; }
.occ-row .occ-when { order: 2; text-align: end; min-width: 8em; }
.occ-when .small { white-space: nowrap; }

/* לשונית ארגון */
.org-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.org-box textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 1.6; padding: 10px 12px;
  border: 1px solid var(--gold); border-radius: 10px; resize: vertical; overflow: hidden; }
.org-actions { display: flex; gap: 8px; align-items: center; margin-top: 4px; }

/* יוצא (לשעבר) */
.org-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.former-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); cursor: pointer; }
.badge.org.former, .chip.former { opacity: .6; font-style: italic; }

/* תפריט צד (ארגונים, ובעתיד עוד תפריטים) */
.app-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 0; align-items: start; }
.side-menu { position: sticky; top: 0; max-height: 100vh; overflow-y: auto; background: var(--surface);
  border-inline-end: 1px solid var(--gold); padding: 12px 10px 24px; min-height: calc(100vh - 64px); box-sizing: border-box; }
.side-title { margin: 4px 6px 6px; font-size: 15px; color: var(--accent); }
.side-section + .side-section { border-top: 1px solid var(--gold); margin-top: 10px; padding-top: 8px; }
.menu-toggle { display: none; font-size: 20px; }
@media (max-width: 800px) {
  .app-body { grid-template-columns: 1fr; }
  .side-menu { display: none; position: static; min-height: 0; border-inline-end: none; border-bottom: 1px solid var(--gold); }
  body.menu-open .side-menu { display: block; }
  .menu-toggle { display: inline-block; }
}
.org-group h4 { margin: 10px 6px 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.org-link { display: flex; justify-content: space-between; align-items: center; width: 100%; background: none; border: none;
  padding: 7px 10px; border-radius: 8px; font: inherit; cursor: pointer; text-align: start; color: inherit; }
.org-link:hover { background: var(--chip); }
.org-link.on { background: var(--accent); color: #fff; }
.org-main h2 { margin: 4px 0; }
.former-head { margin-top: 22px; color: var(--muted); }
.former-list .row { opacity: .7; }
.org-link.org-top { font-weight: 600; margin-top: 6px; }
.org-link.org-sub { padding-inline-start: 22px; font-size: 14px; }
.org-part { border-top: 1px solid var(--gold); padding-top: 6px; margin-top: 14px; }
.org-part h3 { margin: 6px 0 0; }
.org-part .org-open { font-size: 18px; font-weight: 600; text-decoration: none; }
.org-group + .org-group { border-top: 1px dashed var(--gold); margin-top: 6px; padding-top: 4px; }

/* קאמפיין */
dialog.sheet.full { width: min(1200px, 96vw); max-width: 96vw; max-height: 94vh; }
.camp-table-wrap { overflow-x: auto; margin: 10px 0; }
.camp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.camp-table th { text-align: start; font-weight: 500; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--gold); white-space: nowrap; }
.camp-table td { padding: 4px; vertical-align: middle; }
.camp-table input:not([type=checkbox]), .camp-table select { width: 100%; box-sizing: border-box; padding: 6px 8px; font: inherit; }
.camp-table td.num { color: var(--muted); width: 2em; text-align: center; }
.camp-table td.center { text-align: center; }
.camp-table .donor-cell { min-width: 290px; position: relative; }
.camp-table .donor-cell .one-time { position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%); font-size: 10px; }
.camp-table [name=c_amount] { width: 7em; }
.camp-table tr.bad td { background: color-mix(in srgb, var(--danger) 14%, transparent); }
.camp-footer { position: sticky; bottom: 0; background: var(--surface); padding-top: 10px; border-top: 1px solid var(--gold); }

/* דף קאמפיין */
.side-sum { font-size: 12px; color: var(--muted); direction: ltr; }
.org-link.on .side-sum { color: #fff; }
.side-empty { margin: 4px 8px; }
.camp-page-head { display: flex; align-items: flex-start; gap: 12px; }
.camp-page-head h2 { margin: 4px 0; }
.camp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.camp-stats div { background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.camp-stats span { font-size: 13px; color: var(--muted); }
.camp-stats b { font-size: 22px; direction: ltr; text-align: end; }
.camp-name input { font-size: 17px; }
@media (max-width: 700px) { .camp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.org-pick { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.org-pick select { font-size: 16px; max-width: 26em; }
.camp-org-line { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 6px; }
.camp-org-line { white-space: nowrap; }

.side-new { margin: 8px 6px 0; }

.side-home { font-weight: 600; border-bottom: 1px solid var(--gold); border-radius: 8px 8px 0 0; margin-bottom: 8px; }

/* פס "איר זענט יעצט אין" */
.scope-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 16px 0; padding: 10px 14px;
  background: var(--accent); color: #fff; border-radius: 12px; font-size: 15px; }
.scope-bar b { font-size: 18px; }
.scope-bar .check { color: #fff; font-size: 14px; }
.scope-bar .btn { background: #fff; color: var(--accent); border-color: #fff; }

.btn-group { display: inline-flex; gap: 8px; flex-wrap: nowrap; }

/* סעריע: אלע יארן */
.series-table { width: 100%; border-collapse: collapse; margin-top: 12px; background: var(--surface); border-radius: 12px; overflow: hidden; }
.series-table th { text-align: start; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--gold); font-size: 13px; }
.series-table td { padding: 10px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 35%, transparent); }
.series-table tbody tr { cursor: pointer; }
.series-table tbody tr:hover { background: var(--chip); }
.series-table td.num { direction: ltr; text-align: end; white-space: nowrap; }
.series-table .bar-cell { width: 30%; }
.series-table .bar { display: block; height: 10px; border-radius: 5px; background: var(--gold); min-width: 2px; }
.nc-preview { font-size: 15px; margin: 0; }
.nc-preview b { color: var(--accent); }
#newcamp-dialog { width: min(640px, 94vw); }

/* עמוד אדמין */
.adm-group { margin-top: 18px; }
.adm-group-title { color: var(--accent); border-bottom: 1px solid var(--gold); padding-bottom: 4px; }
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.adm-card { background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 12px; }
.adm-card.dirty { box-shadow: 0 0 0 2px var(--accent); }
.adm-card h3 { margin: 2px 0 6px; font-size: 16px; }
.adm-table { width: 100%; border-collapse: collapse; }
.adm-table td { padding: 2px 3px; }
.adm-table input { width: 100%; box-sizing: border-box; padding: 5px 8px; font: inherit; font-size: 14px; }
.adm-table input[readonly] { background: var(--chip); color: var(--muted); }
.adm-used { font-size: 11px; color: var(--muted); white-space: nowrap; }
.adm-btns { white-space: nowrap; }
.adm-btns .linkish { text-decoration: none; padding: 0 3px; font-size: 14px; }
.adm-actions { display: flex; gap: 8px; margin-top: 8px; }

.topbar #btn-admin.on { background: var(--accent); color: #fff; }

.side-home { font-size: 16px; }
#home-count { margin-inline-start: 6px; }

/* בונה רשימות */
.lb-form { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.lb-form details { background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 12px; }
.lb-form summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.lb-block { margin: 8px 0; display: flex; flex-direction: column; gap: 4px; }
.lb-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; }
.lb-row select, .lb-row input { font: inherit; padding: 6px 8px; }
.lb-min input { width: 7em; }
.lb-manual { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-plus { background: #e3f1e4; } .lb-minus { background: #f6dede; text-decoration: line-through; }
.lb-result-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.lb-result-head #lb-name { font: inherit; padding: 7px 10px; min-width: 16em; }
.lb-table-wrap { overflow-x: auto; }
.lb-table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14px; }
.lb-table th { text-align: start; color: var(--muted); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--gold); white-space: nowrap; }
.lb-table td { padding: 6px 8px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.lb-table tbody tr { cursor: pointer; }
.lb-table tbody tr:hover { background: var(--chip); }
@media print {
  .lb-form, .lb-result-head, .camp-page-head, .no-print, #scope-bar { display: none !important; }
  .lb-table { font-size: 11px; }
}

.adm-card.adm-wide { grid-column: span 2; }
@media (max-width: 760px) { .adm-card.adm-wide { grid-column: auto; } }

/* איבערבליק פון רשימות */
.side-title-btn { background: none; border: none; font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-align: start; }
.side-title-btn:hover { text-decoration: underline; }
.lo-table tbody tr { cursor: pointer; }
.lo-btns { white-space: nowrap; text-align: end; }
.lo-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.lo-tpl { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: start; background: var(--surface);
  border: 1px solid var(--gold); border-radius: 12px; padding: 12px 14px; font: inherit; cursor: pointer; color: inherit; }
.lo-tpl:hover { border-color: var(--accent); }

.lb-addbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; }
.lb-addbar input { font: inherit; padding: 7px 10px; min-width: 22em; }
.lb-manual-row td:first-child::before { content: '+ '; color: #2e7d32; font-weight: 700; }
.lb-removed { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lb-removed .chip.lb-minus { text-decoration: none; }
.lb-removed .chip.lb-minus button { text-decoration: none; font-size: 12px; margin-inline-start: 4px; }
#lb-save.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }

/* לאבי */
body.lobby-mode .side-menu, body.lobby-mode .tabs, body.lobby-mode #scope-bar, body.lobby-mode .menu-toggle { display: none !important; }
body.lobby-mode .app-body { grid-template-columns: 1fr; }
.lobby { max-width: 1000px; margin: 0 auto; }
.lobby-head { text-align: center; margin: 18px 0 10px; }
.lobby-logo { width: 110px; height: auto; }
.lobby-head h1 { margin: 6px 0 2px; color: var(--accent); }
.lobby-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 14px 0; }
.lobby-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 130px;
  background: var(--surface); border: 1px solid var(--gold); border-radius: 16px; padding: 16px; font: inherit; color: inherit;
  cursor: pointer; text-align: center; transition: transform .1s, box-shadow .1s; }
.lobby-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: var(--accent); }
.lobby-tile b { font-size: 18px; }
.lobby-tile[data-primary] { background: var(--accent); color: #fff; border-color: var(--accent); }
.lobby-tile[data-primary] .muted { color: #f3e3c4; }
.lobby-tile.open { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.lobby-icon { font-size: 34px; line-height: 1; }
.lobby-choose { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--surface); border: 1px dashed var(--accent);
  border-radius: 12px; padding: 12px; }
.soon-box { text-align: center; margin: 60px auto; max-width: 520px; }

.lobby-row4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .lobby-row4 { grid-template-columns: 1fr; } }

body.solo-mode .tabs, body.solo-mode #scope-bar { display: none !important; }

.occ-tags { display: inline-flex; flex-wrap: wrap; gap: 3px; margin-inline-start: 6px; vertical-align: middle; }
.badge.mini, .chip.mini { font-size: 10px; padding: 1px 6px; line-height: 1.5; }

/* Mail Merge */
.mm-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 10px; }
.mm-panel { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 160px); overflow-y: auto; position: sticky; top: 10px; }
.mm-panel details { background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 8px 10px; }
.mm-panel summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.mm-panel select, .mm-panel input:not([type=checkbox]):not([type=range]):not([type=file]), .mm-panel textarea { width: 100%; box-sizing: border-box; font: inherit; font-size: 14px; padding: 5px 8px; margin: 3px 0; }
.mm-panel textarea { font-family: Georgia, serif; }
.mm-l { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); margin-top: 6px; }
.mm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; color: var(--muted); }
.mm-tokens { display: flex; flex-wrap: wrap; gap: 4px; direction: ltr; }
.mm-tokens .chip { cursor: pointer; }
.mm-stage { min-width: 0; }
.mm-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mm-canvas { background: #d9d4cc; border-radius: 12px; padding: 10px; overflow: hidden; }
.env { position: relative; background: #fff; color: #111; box-shadow: 0 4px 14px rgba(0,0,0,.18); overflow: hidden; }
.env-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.env-part { position: absolute; cursor: grab; line-height: 1.25; white-space: nowrap; padding: 2px; border: 1px dashed transparent; }
.env-part:hover { border-color: #b88; }
.env-part.dragging { cursor: grabbing; border-color: #a33; background: rgba(255,240,240,.6); }
.env-ret { display: flex; align-items: flex-start; gap: 0.08in; }
.env-ret img { display: block; }
.env-stamp { position: absolute; top: 0.2in; right: 0.2in; width: 0.9in; height: 1in; border: 1px dashed #999; display: flex;
  align-items: center; justify-content: center; text-align: center; line-height: 1.2; }
.env-stamp.no-border { border-color: transparent; }
.env-stamp img { max-width: 100%; max-height: 100%; }
.env-indicia { border-style: solid; border-color: #222; font-family: Arial, sans-serif; font-weight: 700; }
.lbl-sheet { position: relative; width: 8.5in; height: 11in; background: #fff; color: #111; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.lbl { position: absolute; box-sizing: border-box; overflow: hidden; line-height: 1.2; outline: 1px dotted #ccc; display: flex; flex-direction: column; justify-content: center; }
#mm-print-area { display: none; }
@media (max-width: 900px) { .mm-layout { grid-template-columns: 1fr; } .mm-panel { position: static; max-height: none; } }
@media print {
  body.printing-mm > *:not(#app-view) { display: none !important; }
  body.printing-mm #app-view > *:not(.app-body) { display: none !important; }
  body.printing-mm .side-menu, body.printing-mm .app-main > *:not(.mm-view), body.printing-mm .mm-view > section > *:not(#mm-print-area) { display: none !important; }
  body.printing-mm #mm-print-area { display: block !important; }
  body.printing-mm .app-body { display: block; }
  body.printing-mm .env-print { box-shadow: none; margin: 0; overflow: hidden; }
  body.printing-mm .env-print:not(:last-child) { page-break-after: always; break-after: page; }
  body.printing-mm, body.printing-mm #app-view, body.printing-mm .app-body, body.printing-mm .app-main,
  body.printing-mm .mm-view, body.printing-mm #mailmerge-main { margin: 0 !important; padding: 0 !important; border: 0 !important; max-width: none !important; }
  body.printing-mm .lbl { outline: none; }
  body.printing-mm .env-stamp:not(.env-indicia) { border-color: transparent; }
  body { background: #fff !important; }
}

.lbl.lbl-used { background: repeating-linear-gradient(45deg, #eee, #eee 4px, #fff 4px, #fff 8px); }
@media print { body.printing-mm .lbl.lbl-used { background: none; } }

.lbl.lbl-empty { outline: 1px dashed #d6d0c6; }
.lbl.lbl-logo { flex-direction: row; align-items: center; gap: 0.06in; }
.lbl.lbl-logo img { height: 70%; max-width: 35%; object-fit: contain; }

.lobby-search-row { grid-template-columns: 3fr 1fr; }
.lobby-search { position: relative; display: flex; }
.lobby-search input { width: 100%; font: inherit; font-size: 20px; padding: 0 22px; min-height: 64px; align-self: center;
  border: 2px solid var(--gold); border-radius: 16px; background: var(--surface); box-sizing: border-box; }
.lobby-search input:focus { outline: none; border-color: var(--accent); }
.lobby-results { position: absolute; top: calc(50% + 36px); inset-inline: 0; z-index: 20; background: var(--surface); border: 1px solid var(--gold);
  border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.12); max-height: 360px; overflow-y: auto; }
.lobby-results:empty { display: none; }
.lobby-hit { display: flex; gap: 10px; align-items: baseline; width: 100%; background: none; border: none; border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  padding: 10px 14px; font: inherit; cursor: pointer; text-align: start; color: inherit; }
.lobby-hit:hover { background: var(--chip); }
.lobby-none { padding: 10px 14px; margin: 0; }
@media (max-width: 700px) { .lobby-search-row { grid-template-columns: 1fr; } }

/* איזור אישי */
.pm-section { background: var(--surface); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; margin: 14px 0; }
.pm-section h3 { margin: 0 0 8px; }
.pm-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pm-title h3 { margin: 0; }
.pm-tabs { display: inline-flex; border: 1px solid var(--gold); border-radius: 10px; overflow: hidden; }
.pm-tabs button { background: none; border: none; padding: 6px 14px; font: inherit; cursor: pointer; color: var(--muted); }
.pm-tabs button.on { background: var(--accent); color: #fff; }
.pm-msg { border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); padding: 8px 6px; cursor: pointer; }
.pm-msg:hover { background: var(--chip); }
.pm-msg.unread .pm-head b, .pm-msg.unread .pm-subj { font-weight: 800; }
.pm-msg.unread { border-inline-start: 4px solid var(--accent); }
.pm-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-subj { color: var(--muted); }
.pm-body { margin: 8px 0; white-space: normal; line-height: 1.6; }
.pm-actions { display: flex; gap: 6px; }
.pm-compose { border: 1px dashed var(--accent); border-radius: 12px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.pm-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.pm-row label { display: flex; flex-direction: column; font-size: 13px; color: var(--muted); gap: 3px; }
.pm-row label.grow { flex: 1; min-width: 200px; }
.pm-row select, .pm-row input, .pm-compose textarea { font: inherit; padding: 6px 8px; }
.pm-compose textarea { width: 100%; box-sizing: border-box; }
.pm-lists { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pm-cols .pm-section { margin: 0; }
.pm-cols .list.compact { max-height: 480px; overflow-y: auto; }
#btn-personal .count-pill { background: var(--accent); }
@media (max-width: 800px) { .pm-cols { grid-template-columns: 1fr; } }

/* To Do */
.td-add { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.td-add input:not([type=checkbox]) { flex: 1; min-width: 220px; font: inherit; padding: 8px 10px; }
.td-add select { font: inherit; padding: 6px 8px; }
.td-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.td-row.done .td-text { text-decoration: line-through; color: var(--muted); }
.td-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); background: none; cursor: pointer; color: transparent; font-weight: 700; flex: none; }
.td-check:hover { color: #2e7d32; border-color: #2e7d32; }
.td-main { flex: 1; min-width: 0; }
.td-text { font-size: 16px; }
.td-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.td-more { margin-top: 8px; }
.td-more summary { cursor: pointer; color: var(--muted); }

/* לאבי: אויבן */
.lobby-top { display: grid; grid-template-columns: 3fr 1fr; gap: 14px; align-items: stretch; margin: 16px 0 8px; }
.lobby-main-col { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.lobby-main-col .lobby-head { margin: 0; }
.lobby-main-col .lobby-search input { min-height: 60px; }
.lobby-main-col .lobby-results { top: 66px; }
.lobby-side-col { display: flex; flex-direction: column; gap: 8px; }
.lobby-me { min-height: 0; padding: 14px 10px; gap: 4px; }
.lobby-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); color: #fff; display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.lobby-quick { background: var(--accent); color: #fff; border: none; border-radius: 12px; padding: 12px 14px; font: inherit;
  font-size: 16px; font-weight: 600; cursor: pointer; text-align: center; transition: filter .1s, transform .1s; }
.lobby-quick:hover { filter: brightness(1.12); transform: translateY(-1px); }
@media (max-width: 700px) { .lobby-top { grid-template-columns: 1fr; } }

/* לאגאס */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 8px; }
.logo-card { background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.logo-box { width: 110px; height: 80px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#f3efe8 0% 25%, #fff 0% 50%) 50% / 14px 14px; border-radius: 8px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-card label.btn { cursor: pointer; }
.mini-logo { height: 20px; width: auto; max-width: 34px; object-fit: contain; vertical-align: middle; margin-inline-end: 6px; }
.scope-logo { height: 30px; width: auto; max-width: 60px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.lobby-pick { display: inline-flex; align-items: center; gap: 6px; }
.lobby-pick img { height: 22px; max-width: 40px; object-fit: contain; background: #fff; border-radius: 4px; padding: 1px; }
.tile-logo { height: 40px; max-width: 90px; object-fit: contain; background: #fff; border-radius: 8px; padding: 3px; }

/* בילד אינעם כרטיס */
.card-head { display: flex; align-items: center; gap: 14px; }
.card-head-text { min-width: 0; }
.card-head-text h2 { margin: 0; }
.card-photo { width: 84px; height: 84px; border-radius: 50%; border: 2px dashed var(--gold); flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--chip); position: relative; }
.card-photo:hover { border-color: var(--accent); }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-photo:has(img:not([hidden])) { border-style: solid; }
.photo-ph { display: flex; flex-direction: column; align-items: center; font-size: 22px; color: var(--muted); }
.photo-ph small { font-size: 11px; }
.card-photo.loading { opacity: .5; }
.photo-del { font-size: 12px; }

.drive-ok { color: #2e7d32; font-size: 14px; margin: 4px 0; }
.drive-warn { color: #8a5a00; font-size: 14px; margin: 4px 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.lobby-row:has([data-tile=receipts]) { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .lobby-row:has([data-tile=receipts]) { grid-template-columns: 1fr 1fr; } }

/* היסטאריע */
details.hist { margin-top: 10px; border-top: 1px dashed var(--gold); padding-top: 8px; }
details.hist summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.hist-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
.hist-table td { padding: 4px 6px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); vertical-align: top; }
.hist-old { color: #a3261f; text-decoration: line-through; }
.hist-new { color: #2e7d32; }
.nowrap { white-space: nowrap; }

.task-about { font-size: 17px; background: var(--chip); border-radius: 10px; padding: 8px 12px; }
#task-dialog { width: min(560px, 94vw); }
#task-form textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; }

/* ---------- נדבות און קאמפיינען — לאבי ---------- */
.solo-only { display: none !important; }
body.solo-mode .solo-only { display: inline-flex !important; }
.hub-back { margin-bottom: 6px; }
.hub-head { align-items: center; }
.hub-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 18px; }
.hub-sub { margin: 8px 0; color: var(--accent); }
.hub-camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.hub-camp { background: var(--surface); border: 1px solid var(--gold); border-radius: 14px; padding: 12px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; transition: transform .12s, box-shadow .12s, border-color .12s; }
.hub-camp:hover, .hub-camp:focus-visible { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); border-color: var(--accent); outline: none; }
.hc-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hc-name { font-size: 17px; }
.hc-year { color: var(--muted); font-size: 14px; }
.hc-total { font-size: 24px; direction: ltr; text-align: end; }
.hc-bar { height: 6px; background: #eee; border-radius: 4px; overflow: hidden; }
.hc-bar span { display: block; height: 100%; background: var(--gold); }
.hub-camp .badge { align-self: flex-start; }
.hub-camp .linkish { align-self: flex-start; }
.hub-recent-head { display: flex; align-items: center; gap: 8px; }
@media (max-width: 700px) { .hub-actions { grid-template-columns: 1fr; } }
@media print { .hub-actions, .hub-back, #hub-lobby { display: none !important; } }

/* ---------- יערליכע / איינמאליגע קאמפיינען ---------- */
.nc-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 14px; }
.nc-kind { display: flex; flex-direction: column; gap: 4px; text-align: start; background: var(--surface); border: 2px solid var(--line, #ddd);
  border-radius: 12px; padding: 12px 14px; font: inherit; cursor: pointer; }
.nc-kind b { font-size: 17px; }
.nc-kind span { font-size: 13px; color: var(--muted); }
.nc-kind.on { border-color: var(--accent); background: #fbf3f3; box-shadow: 0 0 0 2px rgba(122,18,25,.12); }
.warn-text { color: #a8650a; }
.hub-camp.yearly { border-width: 1.5px; }
.hub-camp.off { opacity: .6; }
.series-table tr.this-year td { background: #fbf6e6; }
.camp-stats.with-goal { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.camp-stats .hc-bar { margin-top: 4px; }
@media (max-width: 700px) { .nc-kinds { grid-template-columns: 1fr; } .camp-stats.with-goal { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- גראפיקן: דאס יאר קעגן פאריג יאר ---------- */
:root { --cmp-cur: #a3262f; --cmp-prev: #b8892b; --up: #2f7a3e; --down: #b3261e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cmp-cur: #c94a54; --cmp-prev: #b08a2e; --up: #6cc07c; --down: #f08a80; } }
:root[data-theme="dark"] { --cmp-cur: #c94a54; --cmp-prev: #b08a2e; --up: #6cc07c; --down: #f08a80; }
.nav-btn { font-size: 16px; padding: 9px 16px; font-weight: 600; border: 1.5px solid var(--accent); color: var(--accent); background: var(--surface); }
.nav-btn:hover { background: var(--accent); color: var(--accent-ink); }
.hub-back.nav-btn { margin-bottom: 10px; }
.camp-page-head .nav-btn { margin-bottom: 6px; }
.hc-years { align-self: flex-start; font-size: 14px; padding: 5px 12px; border-color: var(--gold); }
.cmp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; }
.cmp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.cmp-head h3 { margin: 0; color: var(--accent); }
.cmp-sum { margin: 0; }
.cmp-legend { display: flex; gap: 16px; font-size: 14px; color: var(--muted); margin: 6px 0 2px; }
.sw { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--cmp-cur); vertical-align: middle; margin-inline-end: 6px; }
.sw.prev { border-top: 2.5px dashed var(--cmp-prev); }
.cmp-plot { position: relative; }
.cmp-svg { width: 100%; height: auto; display: block; overflow: visible; direction: ltr; }
.cmp-svg .c-grid { stroke: var(--line); stroke-width: 1; }
.cmp-svg .c-mtick { stroke: var(--muted); stroke-width: 1; }
.cmp-svg .c-ax { fill: var(--muted); font-size: 12px; }
.cmp-svg .c-ln { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.cmp-svg .c-ln.cur { stroke: var(--cmp-cur); }
.cmp-svg .c-ln.prev { stroke: var(--cmp-prev); stroke-dasharray: 6 4; }
.cmp-svg .c-dot.cur { fill: var(--cmp-cur); stroke: var(--surface); stroke-width: 2; }
.cmp-svg .c-lbl { font-size: 13px; font-weight: 700; fill: var(--ink); }
.cmp-svg .c-xhair { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.cmp-svg .c-hit { cursor: crosshair; }
.cmp-tip { position: absolute; top: 4px; width: 190px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.cmp-tip[hidden] { display: none; }
.delta { font-weight: 600; white-space: nowrap; }
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta-word { font-weight: 400; color: var(--muted); }
.bars-card .c-bar { fill: var(--cmp-prev); }
.bars-card .c-bar-g.now .c-bar { fill: var(--cmp-cur); }
.bars-card .c-bar-g { cursor: pointer; }
.bars-card .c-bar-g:hover .c-bar { opacity: .85; }
.bars-card .c-val { font-size: 13px; font-weight: 700; fill: var(--ink); }
.bars-card .c-chg { font-size: 12px; font-weight: 600; }
.bars-card .c-chg.up { fill: var(--up); }
.bars-card .c-chg.down { fill: var(--down); }
.bars-card .c-yr { fill: var(--ink); font-size: 13px; }
@media print { .nav-btn { display: none !important; } }
.cmp-zoom { margin-inline-start: auto; order: 3; }

/* ---------- ווער האט נאך נישט געגעבן ---------- */
.lapsed-bar { margin: 0 0 12px; }
.lapsed-card { background: var(--surface); border: 1.5px solid var(--accent); border-radius: 14px; padding: 12px 16px; margin: 0 0 16px; }
.lapsed-head { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.lapsed-head h3 { margin: 0; color: var(--accent); }
.lapsed-head p { margin: 4px 0 0; }
.lapsed-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.lapsed-table th { text-align: start; font-size: 13px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); padding: 6px; }
.lapsed-table td { padding: 7px 6px; border-bottom: 1px solid var(--line); }
.lapsed-table td.num { text-align: end; }
@media print {
  body.printing-lapsed * { visibility: hidden; }
  body.printing-lapsed #lapsed-box, body.printing-lapsed #lapsed-box * { visibility: visible; }
  body.printing-lapsed #lapsed-box { position: absolute; inset: 0 0 auto 0; }
  body.printing-lapsed #lapsed-box .btn { display: none; }
}
/* אדמין: קאמפיינען */
.adm-camps .adm-table select { width: 100%; min-width: 150px; }
.adm-camps .adm-table input[data-col=goal] { width: 100px; }
.adm-camps thead th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: start; padding: 2px 4px; }
.adm-check { white-space: nowrap; }

/* ---------- צוטריט צום שיט / לאגאין מעלדונג ---------- */
.login-msg { background: var(--warn-soft); border: 1px solid var(--gold); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; text-align: start; line-height: 1.5; }
.share-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.share-ok { color: #2f7a3e; font-weight: 600; }
.share-no { color: #a8650a; font-weight: 600; }
.share-extra td { background: #fbf3e6; }

.adm-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 16px; border-bottom: 1.5px solid var(--gold); }
.adm-tabs button { font: inherit; font-size: 16px; font-weight: 600; border: 1px solid var(--line); border-bottom: 0; background: transparent;
  color: var(--muted); padding: 9px 22px; border-radius: 10px 10px 0 0; cursor: pointer; margin-bottom: -1.5px; }
.adm-tabs button.on { background: var(--surface); color: var(--accent); border-color: var(--gold); border-bottom: 1.5px solid var(--surface); }
/* קאד פאר דער לשונית */
.lock-box { max-width: 380px; margin: 30px auto; text-align: center; background: var(--surface); border: 1.5px solid var(--gold); border-radius: 16px; padding: 22px 20px; }
.lock-icon { font-size: 40px; }
.lock-box h3 { margin: 6px 0; color: var(--accent); }
.lock-form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.lock-form input { flex: 1 1 140px; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.lock-err { color: var(--danger); margin: 8px 0 0; }
.code-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.code-box summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.code-box .lock-form { justify-content: flex-start; }
.code-line { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-weight: 600; color: var(--accent); }

/* ---------- Invoice & Receipt ---------- */
.rc-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0 14px; }
@media (max-width: 800px) { .rc-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rc-filters { flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.rc-filters label { display: flex; gap: 6px; align-items: center; }
.rc-actions { display: flex; align-items: center; gap: 10px; margin: 6px 0; }
.rc-table td:first-child, .rc-table th:first-child { width: 28px; }
.rc-log { margin-top: 18px; }
.rc-log summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.rc-void td { text-decoration: line-through; color: var(--muted); }
.od-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.od-item { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: start; font: inherit; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.od-item:hover { border-color: var(--accent); }
.od-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.od-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.od-grid label.wide { grid-column: 1 / -1; }
.od-grid input, .od-grid textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* דער דאקומענט — נאר ביים דרוקן: בריוו אויבן, קופאן אונטן */
#rc-print-area { display: none; }
.rc-doc { font-family: 'Frank Ruhl Libre', 'David', Georgia, serif; color: #1f1a17; width: 7.5in; height: 10in; margin: 0 auto;
  display: flex; flex-direction: column; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rd-banner img { width: 100%; max-height: 2.7in; object-fit: cover; object-position: top; display: block; border-radius: 6px; }
.rd-band { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 10px;
  background: linear-gradient(135deg, #7a1219, #4d0b10); color: #f6e7c1; }
.rd-band img { width: 64px; height: 64px; object-fit: contain; background: #fffaf0; border-radius: 8px; padding: 4px; }
.rd-band-he { font-size: 22pt; font-weight: 700; }
.rd-band-en { font-family: Georgia, serif; font-size: 11pt; letter-spacing: 1px; opacity: .9; }
.rd-letter { flex: 1; font-size: 12.5pt; line-height: 1.55; text-align: justify; padding: 10px 6px 0; }
.rd-letter p { margin: 0 0 10px; }
.rd-date { font-size: 11pt; color: #555; margin-bottom: 8px; }
.rd-sal { font-weight: 700; margin-bottom: 8px; }
.rd-close { margin-top: 12px; padding-inline-start: 2.2in; }
.rd-sig { padding-inline-start: 2.2in; }
.rd-sig img { max-height: 0.55in; max-width: 2.2in; display: block; }
.rd-sigspace { height: 0.4in; }
.rd-cut { border-top: 1.5px dashed #b9a37a; margin: 10px 0 12px; position: relative; height: 0; }
.rd-cut span { position: absolute; left: 10px; top: -10px; background: #fff; color: #a08a5c; font-size: 13pt; padding: 0 4px; }
.cp { direction: ltr; border: 2px solid #b8892b; border-radius: 12px; background: #fbf5e6; overflow: hidden; font-family: Georgia, 'Times New Roman', serif; }
.cp-main { display: grid; grid-template-columns: 2.3in 1fr 1.55in; }
.cp-left { padding: 12px 14px; direction: ltr; text-align: left; border-right: 1px solid #e3d3ad; }
.cp-tag { display: inline-block; background: #7a1219; color: #fff3d6; font-size: 9pt; font-weight: 700; letter-spacing: 1.5px; padding: 3px 10px; border-radius: 4px; }
.cp-org { font-size: 14pt; font-weight: 700; color: #7a1219; margin-top: 8px; font-variant: small-caps; }
.cp-addr, .cp-tel { font-size: 9.5pt; color: #333; margin-top: 3px; }
.cp-from-label { margin-top: 12px; font-size: 8.5pt; letter-spacing: 1px; text-transform: uppercase; color: #8a7448; border-bottom: 1px solid #d8c69c; }
.cp-from { font-size: 10.5pt; margin-top: 4px; line-height: 1.35; }
.cp-mid { padding: 12px 14px; direction: ltr; text-align: left; display: flex; flex-direction: column; gap: 7px; }
.cp-row { display: flex; align-items: center; gap: 8px; }
.cp-lbl { width: 0.95in; font-size: 9.5pt; color: #6b5a3a; }
.cp-amount { flex: 1; background: #fff; border: 1.5px solid #7a1219; border-radius: 6px; padding: 4px 10px; font-size: 15pt; font-weight: 700; color: #7a1219; }
.cp-field { flex: 1; background: #fff; border: 1px solid #d8c69c; border-radius: 6px; padding: 3px 10px; font-size: 10.5pt; }
.cp-pay { display: flex; gap: 14px; font-size: 10.5pt; padding-left: 1in; }
.cp-box.on { color: #7a1219; font-weight: 700; }
.cp-purposes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 10px; font-family: 'Frank Ruhl Libre', 'David', serif; font-size: 9.5pt; color: #444; }
.cp-purposes .on { color: #7a1219; font-weight: 700; }
.cp-lines { width: 100%; border-collapse: collapse; font-size: 9pt; }
.cp-lines td { border-bottom: 1px solid #e3d3ad; padding: 2px 4px; }
.cp-lines .amt { text-align: right; }
.cp-note { font-size: 9.5pt; background: #fff; border: 1px solid #d8c69c; border-radius: 6px; padding: 3px 8px; }
.cp-tax { font-size: 7.8pt; color: #555; line-height: 1.3; }
.cp-side { background: linear-gradient(160deg, #e9d7a6, #c9a24f); padding: 12px 10px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.cp-logo img { width: 1.05in; height: 1.05in; object-fit: contain; }
.cp-he { font-family: 'Frank Ruhl Libre', 'David', serif; font-size: 16pt; font-weight: 700; color: #4d0b10; line-height: 1.1; }
.cp-sub { font-size: 8.5pt; color: #4d3a14; line-height: 1.3; }
.cp-yi { font-size: 9.5pt; color: #7a1219; }
.cp-foot { background: #7a1219; color: #f6e7c1; text-align: center; font-family: 'Frank Ruhl Libre', 'David', serif; font-size: 10.5pt; padding: 5px 10px; }
/* פארעם פאר די פרטים */
.od-sec { margin: 14px 0 4px; color: var(--accent); font-size: 16px; }
.od-imgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.od-img { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.od-prev { width: 100%; height: 90px; display: flex; align-items: center; justify-content: center; background: repeating-conic-gradient(#f3eee4 0 25%, #fff 0 50%) 0 0/14px 14px; border-radius: 6px; overflow: hidden; }
.od-prev img { max-width: 100%; max-height: 90px; object-fit: contain; }
@media print {
  @page { size: letter; margin: 0.5in; }
  body.printing-rc > *:not(#rc-print-area) { display: none !important; }
  body.printing-rc { background: #fff !important; }
  body.printing-rc #rc-print-area { display: block !important; }
  body.printing-rc .rc-doc { break-after: page; page-break-after: always; }
  body.printing-rc .rc-doc:last-child { break-after: auto; page-break-after: auto; }
}
/* דער בריוו אין פארעם */
.od-letter { background: #fffdf8; border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.od-letter input, .od-letter textarea, .od-letter select { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.od-letter textarea { font-family: 'Frank Ruhl Libre', 'David', serif; font-size: 16px; line-height: 1.5; }
.od-date { color: var(--muted); }
.od-sal { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 700; }
.od-sal input { flex: 0 0 170px; width: 170px; }
.od-sal .od-short { flex: 0 0 80px; width: 80px; }
.od-auto { background: var(--gold-soft); color: #5b4511; border-radius: 6px; padding: 4px 10px; font-size: 14px; }
.od-middle { align-self: flex-start; }
.od-hist { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.od-hist select { flex: 1; }
.od-center { display: flex; justify-content: center; }
.od-center input { text-align: center; min-width: 220px; }
.od-sigprev img { max-height: 50px; }
.rc-for { flex: 1 1 300px; }
.rc-for input { flex: 1; font: inherit; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; }
.rd-close, .rd-sig { padding-inline-start: 0 !important; text-align: center; }
.rd-sig { display: flex; flex-direction: column; align-items: center; }
/* פרטים פאר קבלות: פעלדער + לעבעדיגע פראבע */
#orgdet-dialog { max-width: min(1280px, 96vw); width: 96vw; }
.od-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 18px; align-items: start; }
.od-section { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 8px; }
.od-live { position: sticky; top: 0; }
.od-live-head { font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.od-live-box { position: relative; direction: ltr; width: 400px; height: 535px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.od-live-scale { position: absolute; left: 0; top: 0; width: 7.5in; transform: scale(.52); transform-origin: top left; direction: ltr; padding: 14px; }
.od-img-btns { display: flex; gap: 8px; align-items: center; }
.od-letter .od-img { align-items: center; background: #fff; }
.od-letter .od-prev { height: 60px; width: 220px; }
@media (max-width: 1000px) { .od-layout { grid-template-columns: 1fr; } .od-live { position: static; } }
.lt-sigrow { gap: 8px; align-items: center; }
.lt-sigtext { font-size: 24px !important; min-width: 260px; text-align: center; color: #1b2f6b; }
.rd-sigtext { font-size: 22pt; line-height: 1.1; color: #1b2f6b; margin-bottom: 2px; }
.danger-text { color: var(--danger) !important; }
/* אימעיל */
#mail-dialog .ml-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 800px) { #mail-dialog .ml-layout { grid-template-columns: 1fr; } }
.ml-fields { display: flex; flex-direction: column; gap: 8px; }
.ml-fields label { display: flex; flex-direction: column; gap: 3px; }
.ml-fields input, .ml-fields select, .ml-fields textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }
.ml-from { margin: 0; }
.ml-count { margin: 0; }
.ml-files { display: flex; gap: 8px; flex-wrap: wrap; }
.ml-attached { display: flex; gap: 6px; flex-wrap: wrap; }
.ml-chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 6px; background: var(--surface); }
.ml-chip img { width: 46px; height: 34px; object-fit: cover; border-radius: 4px; }
.ml-preview { display: flex; flex-direction: column; min-height: 420px; }
.ml-preview iframe { flex: 1; width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #f4ede0; }
.ml-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.ml-bar { flex: 1; height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
.ml-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.warn-text { color: #b45309; }
.rc-who { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rc-who input { min-width: 180px; }
/* א בילד גרויס */
#photo-view { border: none; border-radius: 14px; padding: 0; background: #111; max-width: min(92vw, 900px); overflow: hidden; }
#photo-view::backdrop { background: rgba(0, 0, 0, .75); }
#photo-view img { display: block; max-width: min(92vw, 900px); max-height: 78vh; margin: 0 auto; object-fit: contain; }
#photo-view .x-close { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 1; }
#photo-view .pv-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--surface); color: var(--ink); flex-wrap: wrap; }
/* בקשות פון די גבאים */
.rq-list { display: flex; flex-direction: column; gap: 8px; }
.rq-row { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rq-icon { font-size: 20px; line-height: 1.2; }
.rq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rq-note { font-size: 13px; background: var(--bg, #faf6ee); border-radius: 6px; padding: 4px 8px; }
.rq-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.rq-done { margin-top: 12px; }
.rq-done summary { cursor: pointer; color: var(--muted); }
/* הילף */
.hp-search, .hp-ask input { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.hp-ask { display: flex; gap: 8px; }
.hp-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.hp-sec { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.hp-sec summary { cursor: pointer; padding: 10px 14px; font-weight: 600; }
.hp-sec[open] summary { color: var(--accent); border-bottom: 1px solid var(--line); }
.hp-body { padding: 6px 16px 10px; line-height: 1.6; }
.hp-body ul, .hp-body ol { margin: 4px 0; padding-inline-start: 22px; }
.hp-answer { margin-top: 10px; background: var(--surface); border: 1px solid var(--gold); border-radius: 10px; padding: 10px 14px; }
.hp-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-inline-end: 40px; }
.hp-head h2 { margin: 0 0 8px; }
/* הילף-AI: אונטן לינקס */
.ai-chat { position: fixed; left: 16px; bottom: 16px; z-index: 50; width: min(360px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; }
.ai-bar { display: flex; gap: 6px; background: var(--surface); border: 1.5px solid var(--gold); border-radius: 999px; padding: 4px 4px 4px 6px; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.ai-input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; padding: 8px 10px; color: var(--ink); outline: none; }
.ai-send { border: none; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #fff); width: 38px; height: 38px; cursor: pointer; font-size: 16px; }
.ai-chat:not(.open) { width: min(290px, calc(100vw - 32px)); }
.ai-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 8px 28px rgba(0,0,0,.2); display: flex; flex-direction: column; max-height: min(520px, calc(100vh - 120px)); overflow: hidden; }
.ai-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--accent); color: var(--accent-ink, #fff); }
.ai-head .muted { color: inherit; opacity: .85; }
.ai-x { background: transparent; border: none; color: inherit; font-size: 16px; cursor: pointer; }
.ai-log { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.ai-msg { border-radius: 12px; padding: 8px 12px; line-height: 1.5; max-width: 92%; font-size: 14.5px; }
.ai-msg p { margin: 0 0 6px; } .ai-msg p:last-child { margin: 0; }
.ai-msg ul, .ai-msg ol { margin: 4px 0; padding-inline-start: 20px; }
.ai-msg.bot { background: var(--bg, #f6efe2); align-self: flex-start; }
.ai-msg.me { background: var(--accent); color: var(--accent-ink, #fff); align-self: flex-end; }
.ai-msg.warn { color: #b45309; }
.ai-welcome { border: 1px dashed var(--gold); }
.hp-ai-link { margin: 8px 0 0; }
@media print { .ai-chat { display: none !important; } }
/* אריינלייגן פון Excel */
.imp-steps { margin: 6px 0 10px; padding-inline-start: 22px; line-height: 2.1; }
.imp-sum { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.imp-tag { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 600; white-space: nowrap; }
.imp-tag input { font: inherit; padding: 6px 9px; border: 1px solid var(--gold); border-radius: 8px; min-width: 0; flex: 1; max-width: 360px; background: var(--surface); color: var(--ink); }
.imp-table-wrap { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; }
.imp-table tr.imp-dup td { background: #fff7e0; }
.imp-table tr.imp-error td { background: #fde8e8; }
/* פלאץ אונטן, כדי דער AI-שורה זאל נישט צודעקן קיין קנעפלעך */
#app-view:has(#ai-chat) .view { padding-bottom: 84px; }
.imp-auto { color: var(--muted); font-style: italic; border-bottom: 1px dashed var(--gold); }
.imp-table tr.imp-maybe td { background: #eef6ff; }
.imp-maybe-b { background: #dbeafe; color: #1e3a8a; }
.imp-pick { vertical-align: middle; }
/* טעלעפאן: די אויבערשטע שורה זאל נישט ארויסגיין פון בלאט */
html, body { overflow-x: clip; }
.ai-send .ai-ico-closed { display: none; }
@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; gap: 4px 6px; padding: 6px 8px; }
  .brand > span { display: none; }
  .brand img { height: 38px; }
  .topbar .btn.ghost { padding: 5px 8px; font-size: 13px; }
  #btn-help > span[data-i18n], #btn-personal > span[data-i18n] { display: none; }
  .topbar .lang-switch button { padding: 3px 8px; font-size: 12px; }
  /* דער AI: צוגעמאכט — נאר א קליינער רונדער קנעפל */
  .ai-chat:not(.open) { width: auto; }
  .ai-chat:not(.open) .ai-input { display: none; }
  .ai-chat:not(.open) .ai-bar { padding: 4px; }
  .ai-chat:not(.open) .ai-send .ai-ico-closed { display: inline; }
  .ai-chat:not(.open) .ai-send .ai-ico-open { display: none; }
  .ai-chat.open { width: calc(100vw - 24px); left: 12px; bottom: 12px; }
}
/* טעלעפאן: גרויסע טאבעלעס / דער קאנווערט — שיבן אין זייט, נישט ארויסשטופן דעם בלאט */
.app-body > *, .page { min-width: 0; }
@media (max-width: 700px) {
  .lapsed-table, .series-table, .adm-table, .imp-table, .lo-table { display: block; overflow-x: auto; max-width: 100%; }
  .mm-stage, .mm-canvas { max-width: 100%; overflow-x: auto; }
  .rc-actions { flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .mm-view label.check { white-space: normal; }
  .mm-view { overflow-x: auto; }
}
@media (max-width: 700px) { .camp-page-head { flex-wrap: wrap; } .camp-page-head > * { max-width: 100%; } }
.imp-act { font: inherit; font-size: 12px; margin-top: 4px; max-width: 150px; } .imp-merge-note { color: #166534; margin-top: 2px; }
.card-notes { white-space: pre-line; }
.imp-old { margin-top: 12px; padding: 8px 12px; border: 1px dashed var(--gold); border-radius: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
/* תגיות נוספות (פער ארגון) */
.ot-group { margin: 8px 0; }
.ot-group h4 { margin: 6px 0; color: var(--accent); }
.ot-group b { display: block; margin-bottom: 4px; color: var(--accent); }
.ot-old h4 { color: var(--muted); }
.ot-add { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 14px; }
.ot-add select { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); }

/* ---------- דער בלאט פון א ישיבה ---------- */
.sc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-head h1 { margin: 0; font-size: 1.5rem; }
.sc-head p { margin: 2px 0 0; }
.sc-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: var(--surface); }
.sc-logo-ph { font-size: 40px; }
.sc-head .spacer, .sc-tools .spacer { flex: 1; }
.sc-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 14px; }
.sc-tabs button { border: 0; background: none; padding: 9px 14px; font: inherit; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; }
.sc-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.sc-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.sc-tools input[type=search] { flex: 1 1 220px; max-width: 360px; }
.sc-asof { display: inline-flex; gap: 6px; align-items: center; }
.sc-table-wrap { overflow-x: auto; }
.sc-table td, .sc-table th { vertical-align: middle; }
.sc-table .num { text-align: end; white-space: nowrap; }
.sc-acts { white-space: nowrap; }
.sc-owe { color: var(--danger); font-weight: 600; }
.sc-soon td { background: var(--accent-soft); }
.sc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.sc-stat { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.sc-stat b { font-size: 1.4rem; }
.sc-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.sc-card-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.sc-card-head .spacer { flex: 1; }
.sc-card-grid { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .95rem; }
.sc-person { margin-bottom: 10px; }
.sc-heb { margin-top: 4px; }

/* ---------- מערדזשן ---------- */
.mg-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin: 10px 0; }
.mg-table th { white-space: nowrap; color: var(--muted); font-weight: 500; }
.mg-table tr.mg-diff td { background: var(--warn-soft); }
.mg-table td label.check { display: flex; gap: 6px; align-items: center; }

.row-father { color: var(--muted); font-size: 13px; unicode-bidi: plaintext; text-align: right; }
html[dir="ltr"] .row-father { text-align: left; }
.tag-stack { display: flex; flex-direction: column; gap: 6px; align-self: flex-start; }
.tag-stack #otag-filter { font-size: 13px; padding-block: 4px; }
.sc-my { display: flex; gap: 6px; }
.sc-my select { flex: 1; min-width: 0; }
.sc-months th.sc-now, .sc-months td.sc-now { background: color-mix(in srgb, var(--gold) 22%, transparent); }
.sc-mcell { width: 76px; padding: 3px 6px; text-align: right; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font: inherit; }
.sc-mcell.sc-changed { border-color: var(--accent, #7a1f1f); font-weight: 600; }
.sc-mon { white-space: nowrap; }
.sc-remind { margin: 10px 0 2px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 18%, transparent); border: 1px solid var(--gold); }
.font-up { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin: 8px 0; }
.font-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.font-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.font-sample { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.font-meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* ---------- שהשמחה במעונם ---------- */
.sg-week { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sg-week b { font-size: 1.1rem; }
.sg-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; }
@media (max-width: 900px) { .sg-wrap { grid-template-columns: 1fr; } }
.sg-list { display: flex; flex-direction: column; gap: 10px; }
.sg-item { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface); }
.sg-item-text { flex: 1; font-family: 'Frank Ruhl Libre', serif; text-align: center; font-size: 15px; }
.sg-item-acts { display: flex; flex-direction: column; gap: 4px; }
.sg-preview-wrap { position: sticky; top: 10px; }
.sg-preview { width: 5.5in; height: calc(8.5in * var(--pages, 1) + 0.2in * (var(--pages, 1) - 1)); transform: scale(.72); will-change: transform; backface-visibility: hidden; transform-origin: top right; margin-bottom: calc((8.5in * var(--pages, 1) + 0.2in * (var(--pages, 1) - 1)) * -.28); margin-left: calc(-5.5in * .28); }
.sg-preview .sg-page { box-shadow: 0 4px 18px rgba(0,0,0,.18); }
html[dir="ltr"] .sg-preview { transform-origin: top left; margin-left: 0; margin-right: calc(-5.5in * .28); }
.sg-page { position: relative; width: 5.5in; height: 8.5in; background: #fff; color: #111; overflow: hidden; direction: rtl; }
.sg-inner { position: absolute; inset: 0; transform: scale(.909); transform-origin: 50% 50%; } /* שוליים פארן דרוקער: ~0.25in */
.sg-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sg-parsha { position: absolute; top: 1.83in; left: 50%; transform: translateX(-50%); min-width: 2.2in; padding: 0.04in 0.25in; border: 1px solid #1f2f6b; border-radius: 0.12in; text-align: center; font-size: 15.4pt; font-weight: 700; color: #1f2f6b; background: rgba(255,255,255,.85); white-space: nowrap; }
.sg-body { position: absolute; top: 2.42in; bottom: 0.72in; left: 0.72in; right: 0.72in; padding: 0 3px 6px; text-align: center; line-height: 1.05; overflow: hidden; }
.sg-body > .sg-entry { margin-bottom: 0.18in; }
.sg-body.sg-cols { column-count: 2; column-gap: 0.14in; column-fill: balance; }
.sg-body.sg-cols > .sg-entry { display: inline-block; width: 100%; box-sizing: border-box; margin-bottom: 0.14in; }
.sg-body.sg-spread:not(.sg-mcols) { display: flex; flex-direction: column; justify-content: space-between; gap: 0.18in; }
.sg-body.sg-spread > .sg-entry { margin-bottom: 0; }
.sg-body.sg-mcols { display: flex; gap: 0.14in; align-items: stretch; }
.sg-col { flex: 1 1 0; min-width: 0; max-width: calc((100% - 0.14in) / 2); display: flex; flex-direction: column; gap: 0.14in; }
.sg-col > .sg-entry { margin: 0; }
.sg-body.sg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.14in; align-items: start; align-content: start; }
.sg-body.sg-grid > .sg-entry { margin: 0; min-width: 0; box-sizing: border-box; overflow-wrap: anywhere; }
.sg-body.sg-grid.sg-odd > .sg-entry:last-child { grid-column: 1 / -1; justify-self: center; width: calc((100% - 0.14in) / 2); }
.sg-mcols.sg-spread .sg-col { justify-content: space-between; }
.sg-measure { position: fixed; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }
.sg-preview .sg-page + .sg-page { margin-top: 0.2in; }
#sg-print-area .sg-page { break-after: page; page-break-after: always; }
#sg-print-area .sg-page:last-child { break-after: auto; page-break-after: auto; }
.sg-entry { break-inside: avoid; background: #fff; padding: 0.07in 0.1in; border-radius: 0.1in; align-self: stretch; box-shadow: 0 1px 4px rgba(20, 30, 70, .22); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sg-entry .sg-note { font-size: .818em; } /* 9 פון 11 */
.sg-entry b { font-weight: 700; }
.sg-live { border: 1px dashed var(--line); border-radius: 10px; padding: 10px; text-align: center; font-family: 'Frank Ruhl Libre', serif; font-size: 17px; background: #fff; color: #111; }
.sg-types { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.chip-radio { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; cursor: pointer; font-size: 14px; background: var(--surface); }
.chip-radio.big { font-size: 16px; padding: 6px 14px; }
.chip-radio:has(input:checked) { border-color: var(--accent, #7a1f1f); background: color-mix(in srgb, var(--gold) 20%, transparent); }
.sg-h { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.sg-h-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sg-title { width: 110px; }
.sg-pick { flex: 1; min-width: 200px; }
.sg-suf { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.sg-suf-other { width: 90px; }
.sg-note-in { flex: 1; min-width: 200px; }
.sg-link { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
@media print {
  body.printing-sg > *:not(#sg-print-area) { display: none !important; }
  body.printing-sg { background: #fff !important; margin: 0; }
  body.printing-sg #sg-print-area { display: block !important; }
}
#sg-print-area { display: none; }
.sg-pageno { position: absolute; bottom: 0.22in; left: 0; right: 0; text-align: center; font-size: 8pt; color: #777; }
.sg-entry.sg-special { border: 1px solid #595959; }
.sg-entry .sg-after { font-size: .9em; }
.sg-toprow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sg-when { display: inline-flex; gap: 6px; align-items: center; }
.sg-special-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; }
.sg-rich-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.sg-rich { min-height: 90px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #fff; color: #111; text-align: center; font-family: 'Frank Ruhl Libre', serif; font-size: 17px; line-height: 1.3; outline: none; }
.sg-rich:focus { border-color: var(--gold); }
.sg-related { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.sg-bar { display: flex; gap: 12px; align-items: stretch; margin: 6px 0 14px; }
.sg-bar .sg-week { flex: 1; margin: 0; }
.sg-new-big { font-size: 1.25rem; padding: 0 26px; border-radius: 12px; white-space: nowrap; }
@media (max-width: 700px) { .sg-bar { flex-direction: column; } .sg-new-big { padding: 12px; } }
.chip-simcha { background: color-mix(in srgb, #7a1f1f 12%, var(--surface)); border-color: #b98b8b; }
.sg-late { margin-top: 6px; font-family: Heebo, sans-serif; font-size: 12px; color: #8a5a00; }
.sg-late-warn { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--gold) 18%, transparent); border: 1px solid var(--gold); font-size: 14px; }
.sg-yt { font-size: 13px; padding: 4px 10px; border: 1px dashed var(--gold); border-radius: 999px; }
/* דער זייט-מעניו איז באהאלטן — אלעס איז דא פונעם לאבי; א "צוריק צום לאבי" קנעפל אויבן */
.side-menu, .menu-toggle { display: none !important; }
.app-body { grid-template-columns: 1fr !important; }
body.lobby-mode #btn-lobby { display: none; }
/* "הערות / תיקונים" — צייטווייליג; א פענצטערל אין ווינקל ווי דער AI */
.fb-chat { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.fb-chat > * { pointer-events: auto; }
.fb-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--gold); background: #fff8e6; color: var(--accent, #7a1520); font: inherit; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.15); cursor: pointer; }
.fb-btn:hover { background: #fff1cc; }
.fb-panel { width: 100%; background: var(--surface, #fff); border: 1px solid var(--gold); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18); overflow: hidden; }
.fb-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff8e6; border-bottom: 1px solid #ecdcae; }
.fb-x { border: 0; background: none; font-size: 16px; cursor: pointer; }
.fb-form { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.fb-form p { margin: 0; }
.fb-form .fb-q { background: #faf6ec; border-inline-start: 3px solid var(--gold); padding: 6px 10px; border-radius: 6px; }
.fb-form .fb-where { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-form textarea { width: 100%; box-sizing: border-box; }
.fb-actions { display: flex; justify-content: flex-end; }
.fb-done { color: #2e7d32; }
@media (max-width: 700px) { .fb-chat:not(.open) .fb-btn span { display: none; } .fb-btn { padding: 10px 12px; } }
@media print { .fb-chat { display: none !important; } }
.fb-item { border: 1px solid #ecdcae; border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: #fffdf6; }
.fb-item.done { opacity: .65; background: transparent; }
.fb-item-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fb-item-text { margin-top: 4px; white-space: normal; }

.td-who { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; margin-top: 6px; }
.chip-check { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid #e3d9bd; border-radius: 999px; font-size: 13px; cursor: pointer; background: #fff; }
.chip-check:has(input:checked) { background: #fff1cc; border-color: var(--gold); }
.chip-check.gen { border-style: dashed; }
.cf-missing { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.cf-missing input[name=gtd_missing_text] { flex: 1; min-width: 200px; }
.gtd { padding: 4px; }
.td-add { flex-wrap: wrap; }
.td-who .chip-check { flex: 0 0 auto; width: auto; }
.td-who .chip-check input { width: auto; flex: none; margin: 0; }
/* ---------- עץ התגיות ---------- */
.tg-pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid #ddd; margin-inline-start: 4px; white-space: nowrap; }
.tg-va { background: #e5f4e4; border-color: #9fd19b; color: #1e5b1b; }
.tg-sa { background: #eef6ec; border-color: #c4e0c0; color: #3b6b37; }
.tg-fc { background: #f9eeda; border-color: #e6cf9f; color: #7a5a14; }
.tg-fn { background: #f0efec; border-color: #d6d3cc; color: #6b6760; }
.tg-u { background: #ededed; border-color: #cfcfcf; color: #777; }
.tg-card .tg-block { padding: 6px 10px; border: 1px solid #ecdcae; border-radius: 10px; margin: 6px 0; background: #fffdf6; }
.tg-card .tg-line { margin-top: 3px; }
.tg-card .tg-line.u { color: #888; }
.tg-warn { color: #a05a00; font-size: 13px; }
.tg-u-badge { background: #fff3e0 !important; color: #a05a00 !important; border: 1px solid #f0c27a; }
.tg-edit .tg-root { border: 1px solid #ecdcae; border-radius: 10px; margin: 6px 0; padding: 4px 10px; background: #fffdf6; }
.tg-edit .tg-root > summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
.tg-edit .tg-kids { padding-inline-start: 18px; }
.tg-edit .tg-leaf, .tg-edit .tg-branch { margin: 3px 0; }
.tg-edit .tg-cb { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; cursor: pointer; }
.tg-edit .tg-cb input { width: auto; }
.tg-edit .tg-stbox, .tg-oldrow .tg-st { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-inline-start: 8px; }
.tg-r { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 8px; border: 1px solid #e3d9bd; border-radius: 999px; cursor: pointer; background: #fff; }
.tg-r input { width: auto; margin: 0; }
.tg-r:has(input:checked) { background: #fff1cc; border-color: var(--gold); font-weight: 700; }
.tg-missing .tg-stbox, .tg-oldrow.tg-missing { outline: 2px solid #d33; border-radius: 8px; }
.tg-old { background: #f5f5f5; border: 1px dashed #bbb; border-radius: 10px; padding: 6px 10px; margin-bottom: 8px; }
.tg-oldrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid #e6e6e6; color: #666; }
.tg-oldrow:last-child { border-bottom: 0; }
.tt-tree, .tt-tree ul { list-style: none; padding-inline-start: 18px; margin: 4px 0; }
.tt-tree { padding-inline-start: 0; }
.tt-row { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-bottom: 1px dotted #e6dcc0; }
.tt-root > .tt-row { background: #fff8e6; border-radius: 6px; }
.tt-use { min-width: 24px; }
.tt-orgs { margin: 2px 24px; }
.tg-sel-tree, .tg-sel-tree ul { list-style: none; padding-inline-start: 16px; margin: 2px 0; }
.tg-sel-tree { padding-inline-start: 0; column-width: 260px; }
.tg-sel-tree details { display: inline; }
.tg-sel-tree details > summary { display: inline; cursor: pointer; list-style: none; }
.tg-sel-st { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; align-items: center; }
.tt-mig { margin-top: 18px; padding: 10px 14px; border: 1px dashed var(--gold); border-radius: 10px; background: #fffdf6; }
.tt-mig h4 { margin: 0 0 4px; }
#tag-filter, #otag-filter { display: none !important; }
.tf-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tf-row select { max-width: 220px; }
.tf-sep { color: var(--gold); font-weight: 700; }
.sg-offer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 6px 10px; background: #fff8e6; border: 1px dashed var(--gold); border-radius: 8px; }
.sg-offer .chip-check input { width: auto; margin: 0; }
.sg-who { color: #6b5a2a; margin: 2px 4px 0; }
.sg-who:empty { display: none; }
.sg-pickwrap { flex: 1; min-width: 200px; display: inline-flex; flex-direction: column; gap: 2px; }
.sg-pickwrap .sg-pick { width: 100%; min-width: 0; }
.sg-pickwrap .sg-who { display: block; margin: 0 6px; line-height: 1.3; }
.sg-h-line:has(.sg-pickwrap) { align-items: flex-start; }
.sg-exports { display: inline-flex; flex-direction: column; gap: 4px; align-items: stretch; }
.sg-exports-row { display: inline-flex; gap: 4px; }
.login-about { max-width: 520px; margin: 18px auto 0; text-align: center; font-size: 12.5px; color: #6b5a4a; line-height: 1.5; }
.login-about a { color: inherit; }
.login { display: flex; flex-direction: column; align-items: center; justify-content: center; }
