/* שכבת קומפוזיציה ודגשים מעל theme-lime.css (ניסיון 2026-10-16).
   להחזרה לעיצוב הקודם: למחוק את שורת ה-link של הקובץ הזה ב-index.html. */

/* ---------- יישור: הסרגל העליון באותו רוחב כמו התוכן ---------- */
.top { max-width: 1152px; margin-inline: auto; }

/* ---------- פתיחה: כרטיס פסטיבל גדול + ארבעת המדדים לידו ---------- */
.overview { max-width: 1200px; margin: 0 auto; padding: 24px 24px 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 2fr); gap: 16px; align-items: stretch; }
/* בנות שירות הן מסך נפרד עם מדדים משלו, בלי כרטיס הפסטיבל */
body.sherut-mode .overview { display: none; }
.overview .stats { max-width: none; margin: 0; padding: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }

.feature {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
  padding: 26px 28px 24px; border-radius: 26px; color: #fff;
  /* רקע נקי: ירוק כהה אחיד עם מעבר עדין, ברק דק בקצה העליון ומסגרת פנימית דקה */
  background: linear-gradient(160deg, #1f5223 0%, #183f1b 100%);
  box-shadow: 0 24px 48px -26px rgba(20, 60, 25, .75), inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.feature::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 45%);
}
.feat-k { display: flex; align-items: center; gap: 10px; font-size: 13px; letter-spacing: .3px; color: rgba(233, 249, 210, .75); }
/* פס ליים קצר לפני התווית, נקודת הצבע היחידה מלבד מד התפוסה */
.feat-k::before { content: ""; width: 26px; height: 4px; border-radius: 99px; background: var(--grad); }
.feat-name { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin-bottom: 6px; }
.feat-meter { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .14); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25); }
.feat-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #86dc50, #c9f78c); transform-origin: right; animation: feat-fill .9s cubic-bezier(.22, 1, .36, 1) both; box-shadow: 0 0 14px rgba(181, 239, 111, .6); }
.feat-meter.warn i { background: linear-gradient(90deg, #ff6b2c, #ffb07a); box-shadow: 0 0 14px rgba(255, 107, 44, .5); }
.feat-meter.full i { background: linear-gradient(90deg, #e5484d, #ff8a8d); box-shadow: 0 0 14px rgba(229, 72, 77, .5); }
.feat-line { font-size: 14px; color: rgba(233, 249, 210, .8); }
.feat-line strong { font-size: 22px; font-weight: 700; color: #b5ef6f; margin-inline-end: 2px; }
@keyframes feat-fill { from { transform: scaleX(0); } }

/* ---------- כותרת לרשימה במקום שורת רמז קטנה ---------- */
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 4px 14px; }
.list-head h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.list-head h2 em { font-style: normal; font-size: 13px; font-weight: 600; color: var(--dark); background: var(--grad); border-radius: 99px; padding: 2px 10px; }
.list-head .hint { margin: 0; }

/* ---------- כרטיס הזמנה: עיגול אות, שם בולט, כמות בצורת ספח כרטיס ---------- */
.card header { align-items: center; gap: 12px; }
.card header .av {
  flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  font-style: normal; font-size: 16px; font-weight: 700; color: var(--dark);
  background: var(--soft); border: 1px solid rgba(28, 74, 31, .1);
}
.card header b { font-size: 19px; }
.qty {
  position: relative; display: grid; place-items: center; align-content: center; min-width: 66px; padding: 8px 10px 7px; line-height: 1;
  border-radius: 12px; background: var(--soft); color: var(--dark);
  /* חריצים בצדדים, כמו ספח של כרטיס */
  -webkit-mask: radial-gradient(circle 6px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
  mask: radial-gradient(circle 6px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 6px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.qty small { margin-top: 3px; color: #3c6a2c; }

/* ---------- סיורים: כותרת יום כתווית עם קו, שעה בולטת ---------- */
#tours h3 { display: flex; align-items: center; gap: 10px; margin: 18px 4px 10px; font-size: 14px; font-weight: 700; color: var(--dark); }
#tours h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to left, rgba(28, 74, 31, .25), transparent); }
#tours h3:first-child { margin-top: 4px; }
.tour .time { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

/* ---------- רשימה שמית: כותרת גדולה, מד תפוסה, טבלה נקייה ---------- */
.roster-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.roster-head p b { font-size: 18px; color: var(--dark); }
.r-meter { height: 8px; margin: 8px 0 4px; border-radius: 99px; background: rgba(28, 74, 31, .1); overflow: hidden; }
.r-meter i { display: block; height: 100%; border-radius: inherit; background: var(--grad); animation: feat-fill .7s cubic-bezier(.22, 1, .36, 1) both; }
.r-meter.warn i { background: linear-gradient(90deg, #ff6b2c, #ffb07a); }
.r-meter.full i { background: linear-gradient(90deg, #e5484d, #ff8a8d); }
.roster-actions { margin-top: 14px; }

/* טבלאות (רשימה שמית ויומן): כותרות קטנות, שורות עם ריחוף, כמות כתגית */
#roster table, #log table { border-collapse: separate; border-spacing: 0; }
#roster th, #log th { font-size: 12px; font-weight: 600; letter-spacing: .3px; color: var(--muted); border-bottom: 1px solid var(--line); padding-block: 10px; }
#roster td, #log td { border-bottom: 1px solid var(--line); }
#roster tbody tr:last-child td, #log tbody tr:last-child td { border-bottom: 0; }
#roster tbody tr, #log tbody tr { transition: background-color .15s; }
@media (hover: hover) { #roster tbody tr:hover, #log tbody tr:hover { background: rgba(181, 239, 111, .14); } }
#roster td:first-child { font-weight: 600; }
#roster td:nth-child(3) { font-weight: 700; color: var(--dark); }
#log td small { display: block; font-size: 12px; color: var(--muted); }
/* יומן: תאריך קריא משמאל לימין, ושם הלקוח והמוקדים מודגשים */
#log td:first-child { direction: ltr; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; }
#log td:nth-child(2), #log td:nth-child(4), #log td:nth-child(5) { font-weight: 600; }
#log td:nth-child(3) { font-weight: 700; color: var(--dark); }
#log td small { font-weight: 400; }
/* חץ בין "מסיור" ל"לסיור" כדי שהכיוון ייקרא במבט אחד */
#log td:nth-child(5) { position: relative; padding-inline-start: 30px; }
#log td:nth-child(5)::before {
  content: ""; position: absolute; inset-inline-start: 4px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 6px;
  background: var(--soft) center / 12px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c4a1f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E");
}

/* מצבים ריקים: אייקון בעיגול ליים מעל הטקסט */
#roster > .empty, #log > .empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; font-size: 15px; }
#roster > .empty::before, #log > .empty::before {
  content: ""; width: 64px; height: 64px; border-radius: 20px; background: var(--soft) center / 30px no-repeat;
  box-shadow: inset 0 0 0 1px rgba(28, 74, 31, .08);
}
#roster > .empty::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c4a1f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1'/%3E%3Ccircle cx='4.5' cy='12' r='1'/%3E%3Ccircle cx='4.5' cy='18' r='1'/%3E%3C/svg%3E"); }
#log > .empty::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c4a1f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }

/* ---------- מפת חדרים: סרגל כלים כמשטח, עומק לחדרים תפוסים, פנויים בקו מקווקו ---------- */
.rooms-bar {
  padding: 14px 16px; border-radius: 20px; background: var(--glass); border: var(--glass-border); box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.rooms-summary { margin: 14px 4px; font-size: 15px; }
.rooms-summary b { font-size: 17px; font-weight: 700; }
.rooms-map { gap: 12px; }
.room { border-width: 1.5px; border-radius: 16px; transition: transform .15s ease-out, box-shadow .2s, background-color .2s; }
.room:not(.part):not(.full) { border-style: dashed; background: rgba(255, 255, 255, .6); }
.room.part { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); }
.room.full, .room.full:hover {
  border-color: transparent;
  background: linear-gradient(160deg, color-mix(in srgb, var(--rt) 78%, #fff) 0%, var(--rt) 70%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 22px -16px var(--rt);
}
.room:active { transform: scale(.97); }

/* ---------- טלפון ---------- */
@media (max-width: 900px) {
  .overview { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .overview { padding: 14px 12px 0; gap: 10px; }
  .overview .stats { gap: 10px; }
  .feature { padding: 20px 18px 18px; border-radius: 20px; }
  .feat-name { font-size: 30px; }
  .list-head h2 { font-size: 19px; }
  /* עיגול האות בצד, השם ושורת הפרטים לידו */
  .card header { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 2px 10px; }
  .card header .av { grid-row: 1 / 3; width: 38px; height: 38px; font-size: 16px; border-radius: 12px; }
  .card header b { grid-column: 2 / 4; width: auto; font-size: 17px; }
  .card header span { grid-row: 2; font-size: 14px; }
  .card header span:last-child { justify-self: start; }
}
@media (max-width: 640px) { .roster-head h2 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .feat-meter i, .r-meter i { animation: none; } }
@media print { .overview, .list-head { display: none; } }

/* ---------- סרגל עליון נצמד (גם בטלפון) + לוגו בגרדיינט ---------- */
.top { position: sticky; top: 12px; z-index: 20; }
@media (max-width: 640px) {
  .top { position: sticky; top: 8px; margin: 8px 10px 0; }
}
/* הלוגו נצבע בגרדיינט: התמונה משמשת כמסכה, והפיקסלים המקוריים מוזזים החוצה */
.logo {
  object-position: -99999px 0;
  background: linear-gradient(to left, #86c843 0%, #3c9634 38%, #1f5223 78%, #163d1a 100%);
  -webkit-mask: url(logo.png) center / 100% 100% no-repeat;
          mask: url(logo.png) center / 100% 100% no-repeat;
}
html[data-theme=dark] .logo {
  background: linear-gradient(120deg, #e4ffbf 0%, #b5ef6f 50%, #86dc50 100%);
  padding: 0; border-radius: 0;
}

/* ===== מצב כהה ועקביות (סבב סוכנים) ===== */
html[data-theme=dark] .sd-restable { background: rgba(255, 255, 255, .05) !important; }
html[data-theme=dark] .options { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .12); }
html[data-theme=dark] .options .empty, html[data-theme=dark] .options p { color: var(--ink2); }
html[data-theme=dark] .sd-date small { color: #1c4a1f; opacity: .85; }
html[data-theme=dark] .ride-count { color: #1c4a1f !important; }
html[data-theme=dark] .card header .av { background: rgba(143, 224, 79, .16); color: #b9ef8a; }
html[data-theme=dark] #roster td:nth-child(3), html[data-theme=dark] .roster-head p b, html[data-theme=dark] #log td:nth-child(3), html[data-theme=dark] #tours h3 { color: #b9ef8a !important; }
html[data-theme=dark] .tour.on small, html[data-theme=dark] .tour.on .cap em { color: #b9ef8a !important; }
html[data-theme=dark] #roster > .empty::before, html[data-theme=dark] #log > .empty::before, html[data-theme=dark] #log td:nth-child(5)::before { filter: invert(1) hue-rotate(180deg) brightness(1.4); }
#roster > .empty::before, #log > .empty::before { background-color: transparent !important; box-shadow: none !important; }
html[data-theme=dark] .single { --rt-soft: rgba(47, 143, 214, .18); --rt: #7cc0f2; }
html[data-theme=dark] .double { --rt-soft: rgba(124, 92, 214, .2); --rt: #b6a0f5; }
html[data-theme=dark] .triple { --rt-soft: rgba(224, 138, 30, .18); --rt: #f5b866; }
html[data-theme=dark] .lg .k-part { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }
html[data-theme=dark] .auto-ch i, html[data-theme=dark] .req-manual { color: #8fb8ff; background: rgba(143, 184, 255, .14); }
/* כפתור הגשת חוות דעת: ירוק כהה יותר, טקסט לבן קריא; האייקון בלי עיגול רקע */
.ev-submit { background: #1f8f4e !important; border-color: #1a7d44 !important; }
.ev-submit:hover { background: #1a8247 !important; }
.ev-submit svg { background: none !important; box-shadow: none !important; padding: 0 !important; width: 26px; height: 26px; }
.ev-fit-head b { background: linear-gradient(180deg, #2fa865, #1c7d47); }
/* שדות בעורך האוטומציות ובדיוור: כמו שאר השדות במערכת */
.auto-f input, .auto-f textarea, .auto-test input, .ml-test input { padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); min-height: 42px; background: rgba(255, 255, 255, .85); }
html[data-theme=dark] .auto-f input, html[data-theme=dark] .auto-test input { background: rgba(255, 255, 255, .07); }
/* רדיוס אחיד לכפתורים באותה שורה */
.act.wa, .act.mail { border-radius: 12px !important; font-weight: 500; }
.act.mini { border-radius: 12px; min-height: 36px; }
.staff-top { border-radius: 12px; font-weight: 500; }
/* סקרולבר עדין במצב כהה */
html[data-theme=dark] * { scrollbar-color: rgba(255, 255, 255, .2) transparent; }
html[data-theme=dark] .sd-kpi-main, html[data-theme=dark] button.sd-bar, html[data-theme=dark] .sd-navbtn:not(.on), html[data-theme=dark] .sd-tabs button:not(.on) { background-color: transparent; box-shadow: none; border-color: transparent; }
html[data-theme=dark] p.rooms-summary:not(.rooms-bar *) { background: none !important; border-color: transparent !important; }
html[data-theme=dark] :is(.act.pr, .act.cx, button.ghost) { background: rgba(255, 255, 255, .07) !important; border-color: rgba(255, 255, 255, .13); }
html[data-theme=dark] :is(.act.pr, .act.cx, button.ghost):hover { background: rgba(255, 255, 255, .13) !important; }
/* נופש: סה"כ חדרים */
.rooms-total { margin: 4px 6px 10px; font-size: 15px; color: var(--ink2); }
.rooms-total b { color: var(--ink); font-size: 17px; }
.tour .cap-rooms { font-weight: 700; color: var(--ink); }

/* תשלומים מ-PayPlus */
.pay { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: rgba(34, 181, 115, .14); color: #12764a; white-space: nowrap; }
.pay.part { background: rgba(240, 160, 40, .16); color: #9a5a00; }
.pay-doc { font-size: 12.5px; font-weight: 600; margin-inline-start: 6px; }
.pay-line { margin: 0 0 10px; }
html[data-theme=dark] .pay { background: rgba(110, 231, 168, .14); color: #8ff0bd; }
html[data-theme=dark] .pay.part { background: rgba(255, 190, 90, .14); color: #ffc874; }
.list-head #pay-sync { margin-inline-start: auto; }
.card header .pay-refund { margin-inline-start: auto; }

/* רשימה שמית: כפתורי אייקון קטנים ליד כל נרשם */
.r-ic { white-space: nowrap; }
.ic-btn { width: 38px; height: 38px; min-height: 0; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .7); color: var(--ink); cursor: pointer; vertical-align: middle; }
.ic-btn + .ic-btn { margin-inline-start: 6px; }
.ic-btn svg { width: 18px; height: 18px; }
.ic-btn.wa { color: #1f9d55; }
.ic-btn.mail { color: #2f6fd0; }
.ic-btn:hover { background: #fff; transform: translateY(-1px); }
html[data-theme=dark] .ic-btn { background: rgba(255, 255, 255, .07) !important; border-color: rgba(255, 255, 255, .13); }
html[data-theme=dark] .ic-btn.wa { color: #7fe0a8; } html[data-theme=dark] .ic-btn.mail { color: #8fb8ff; }
@media (max-width: 640px) { .ic-btn { width: 42px; height: 42px; } }

.rf-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 12px; padding: 4px; border-radius: 14px; }
.rf-mode button { min-height: 42px; border-radius: 10px; font-weight: 600; }

/* כפתורי זיכוי: אייקון דולר */
:is(.pay-refund, #bulk-refund, #rf-go, #br-go, #pd-go.act.cx)::after {
  content: ""; flex: none; width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; margin-inline-start: 3px; background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2v20'/%3E%3Cpath d='M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6'/%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.pay-refund, #bulk-refund, #rf-go, #br-go, #pd-go.act.cx) { gap: 0 !important; }

/* דפדפנים עם "מצב כהה אוטומטי" לא צובעים את המערכת בכהה בעצמם: מצב לילה רק מהמתג שלנו */
:root { color-scheme: light; }
:root[data-theme=dark], html[data-theme=dark] { color-scheme: dark; }

/* סמסונג אינטרנט: סימון שיש לאתר ערכת כהה משלו (כדי שלא יחשיך בעצמו), וגופן בלי הגדלה אוטומטית */
@media (prefers-color-scheme: dark) { :root { --has-own-dark: 1; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* ===== מסך הכניסה (QA גלקסי) ===== */
html[data-theme=dark] .login { background: linear-gradient(160deg, #0b1020, #121a2e 55%, #0d1526) !important; }
html[data-theme=dark] .login::before, html[data-theme=dark] .login::after { opacity: .35; }
.login-box button.link { background: none !important; border: 0 !important; box-shadow: none !important; padding: 6px; }
html.locked, html.locked body { height: 100%; overflow: hidden; }
@media (max-height: 520px) {
  .login { overflow-y: auto !important; place-items: start center; }
  .login-box { padding: 20px 22px; gap: 10px; margin-block: 12px; }
  .login-logo { width: min(180px, 60%); }
  .login-steps { display: none; }
}

/* ===== QA גלקסי: גופן מוגדל, מסכים צרים, טלפון לרוחב (מערכת הניהול) ===== */
/* עמודות גריד שיכולות להתכווץ, וכפתורים שיורדים שורה במקום לדחוף את הדף הצידה */
.sd-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.sd-actions .act { white-space: normal; min-height: 44px; height: auto; text-align: center; }
.sd-rooms, .sd-th { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 641px) { .sd-rooms { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); } }
.sd-th select { width: 100%; min-width: 0; }
.sd-person { flex-wrap: wrap; row-gap: 6px; }
.sd-pname { flex: 1 1 140px; min-width: 0; }
.sd-person select { flex: 1 1 120px; min-width: 0; width: auto; }
.rides { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)) !important; }
#roster td:nth-child(2), .ride td[dir=ltr] { white-space: nowrap; direction: ltr; }
.sd-nav { flex-wrap: wrap; max-width: 100%; }
.tabs { grid-auto-rows: 1fr; }
.rooms-setup-grid { grid-template-columns: repeat(auto-fit, minmax(min(100px, 100%), 1fr)) !important; }
.ctr-card h3, .ctr-card .ctr-title { padding-inline-end: 52px; }
.sd-range-n input { width: 3.2em; }
.sd-frow { grid-template-columns: 92px minmax(0, 1fr) minmax(2.5em, auto) !important; }
/* גובה מינימלי במקום גובה קבוע: טקסט גדול לא נחתך */
.ck-btn, .fin, .ev-n, .act.mini, .act.wa.mini, .act.mail.mini { height: auto !important; min-height: 40px; }
.cand-side select, .cand-side button, .cand-side .act { height: auto !important; min-height: 38px; }
.top-actions select#festival { height: auto !important; min-height: 44px; }
#roster { max-height: none; }
@media (min-width: 801px) { #roster { max-height: calc(100dvh - 32px); } }
body { min-height: 100dvh; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 400px) {
  .sd-kpi { padding-inline-end: 44px; }
  .top-actions { flex-wrap: wrap; }
  .top-actions select#festival { flex: 1 1 100%; }
}
/* טלפון לרוחב: כמו בטלפון לאורך (רוב הכללים תלויים ברוחב 640) */
@media (max-height: 500px) and (orientation: landscape) {
  .sd-nav { display: flex; flex-wrap: wrap; }
}
/* מסכים צרים מאוד (גופן מוגדל): פעולות שיורדות שורה, וטבלת הסעות שלא דוחפת את הדף */
.rooms-actions, .ride-actions { flex-wrap: wrap; min-width: 0; }
.rooms-actions > *, .ride-actions > * { min-width: 0; }
.ride { min-width: 0; }
.ride table { width: 100%; table-layout: auto; }
@media (max-width: 400px) {
  .ride td, .ride th { white-space: normal !important; }
  .ride td[dir=ltr] { white-space: nowrap !important; }
  .top { flex-wrap: wrap; }
  .top-actions { min-width: 0; flex-wrap: wrap; }
}
.credit { white-space: nowrap; }
@media (max-width: 400px) { .credit { font-size: 11.5px !important; padding: 8px 12px !important; gap: 6px !important; } }
@media (max-width: 330px) { .credit { font-size: 10.5px !important; } }

/* ===== QA גלקסי, סבב 2 ===== */
/* כפתור הסגירה בחלונות: אטום, כדי שתוכן שנגלל מתחתיו לא ייראה דרכו */
.modal-x { background: rgba(255, 255, 255, .97) !important; box-shadow: 0 6px 16px -8px rgba(20, 30, 50, .45) !important; }
html[data-theme=dark] .modal-x { background: #1d2638 !important; }
/* גרידים שיכולים להתכווץ */
.sd-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .sd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sd-days { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)) !important; }
.ctr-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)) !important; }
.waiting { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)) !important; }
.placed-grid { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)) !important; }
.sd-at label { flex: 1 1 100%; min-width: 0; }
.sd-at select, .sd-th label { min-width: 0; }
.sd-person.ck { grid-template-columns: minmax(0, 1fr) auto !important; }
.opt em.req { white-space: normal; overflow-wrap: anywhere; }
#roster td[dir=ltr] { white-space: nowrap; }
.ride-note.add { white-space: nowrap; }
.top-actions select { text-overflow: ellipsis; }
/* כפתורי פעולה: מתחת ל-640 הטקסט יורד שורה בתוך הכפתור במקום לחרוג מהכרטיס */
@media (max-width: 640px) {
  .act { white-space: normal; min-width: 0; text-align: center; }
  .row-actions, .roster-actions, .rooms-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .top-actions select#festival { flex: 1 1 100%; order: 5; }
  .sd-restable th:nth-last-child(2), .sd-restable td:nth-last-child(2) { display: none; }
  .sd-restable .cand-status { white-space: normal; }
}
@media (max-width: 340px) {
  .row-actions, .roster-actions, .rooms-actions, .sd-actions { grid-template-columns: minmax(0, 1fr) !important; }
  .row-actions > *, .roster-actions > *, .rooms-actions > *, .sd-actions > * { grid-column: auto !important; }
}
/* כפתור בודד בשורה האחרונה: לרוחב מלא */
.sd-actions > .act:first-child ~ :last-child:nth-child(even) { grid-column: 1 / -1; }
.roster-actions > :last-child:nth-child(odd), .tabs > button:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* כרטיסי הגדרת סוגי חדרים מיושרים גם כשהכותרת יורדת שורה */
.rt { justify-content: space-between; }
/* יעדי לחיצה */
#theme-toggle.daynight { min-height: 40px; }
.room-edit, .icon-tool { min-width: 44px; min-height: 44px; }
.auto-tag { min-height: 34px; }
@media (max-width: 360px) { .ctr-person, .sd-person { flex-wrap: wrap; } }

/* חלוקת חדרים: סינון הממתינות לפי סוג חדר */
.wtype-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.wtype { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 999px; font-weight: 600; }
.wtype i { font-style: normal; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .07); }
.wtype.on { background: var(--btn, linear-gradient(180deg, #2f6a33, #1c4a1f)) !important; color: #fff !important; border-color: transparent !important; }
.wtype.on i { background: rgba(255, 255, 255, .22); }
.wtype.single:not(.on) { color: var(--rt, #2f8fd6); } .wtype.double:not(.on) { color: var(--rt, #7c5cd6); } .wtype.triple:not(.on) { color: var(--rt, #e08a1e); }
/* הסעות: כפתורי השורה כאייקונים בלבד (כמו ברשימה השמית), כדי שהטבלה לא תחרוג מהכרטיס */
.ride-row-actions .act { font-size: 0 !important; gap: 0 !important; padding: 0 !important; width: 38px !important; min-width: 0 !important; flex: none; height: 38px !important; min-height: 38px; justify-content: center; border-radius: 10px !important; }
.ride-row-actions .act svg { width: 17px; height: 17px; margin: 0 !important; }
.ride-row-actions .act[data-armed] { font-size: 13px !important; gap: 5px !important; width: auto; padding: 0 10px !important; }
.ride td:nth-child(2) { min-width: 90px; }

/* סיורים: תאריך מקובץ ונפתח בלחיצה */
#tours h3.day-head { margin: 10px 0 8px; }
#tours h3.day-head::after { display: none; }
.day-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 14px; border-radius: 14px; font: inherit; font-size: 15px; font-weight: 700; color: var(--dark); text-align: start; cursor: pointer; }
.day-toggle small { margin-inline-start: auto; font-size: 12.5px; font-weight: 500; color: var(--ink2, #5b6a62); }
.day-pm { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--btn, linear-gradient(180deg, #2f6a33, #1c4a1f)); color: #fff; font-size: 18px; line-height: 1; }
.day-head.open .day-toggle { box-shadow: none; }
html[data-theme=dark] .day-toggle { color: #b9ef8a; }

/* ---------- אריחי מדדים בכל המערכת: אריח צבעוני עם איור 3D קטן שבולט מהפינה ---------- */
.sd-kpis:has(.k3d) { margin-top: 18px; gap: 16px; }
.stats:has(.k3d) { padding-top: 12px; }
.k3d { --k1: #4f9cf7; --k2: #93a9f8; --k3: #e4b8f2; }
html .sd-kpi.k3d, html .stats div.k3d { overflow: visible; color: #15171d; position: relative; padding-inline-end: 72px; justify-content: center;
  background: radial-gradient(70% 90% at 92% 8%, rgba(255, 255, 255, .38), transparent 60%), linear-gradient(to top right, var(--k1) 0%, var(--k2) 52%, var(--k3) 100%) !important; border: 1px solid rgba(255, 255, 255, .6) !important;
  box-shadow: 0 16px 30px -18px var(--k2), inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .1) !important;
  -webkit-backdrop-filter: none; backdrop-filter: none; transition: transform .18s ease, box-shadow .18s ease; }
.k3d.k3d-blue { --k1: #4f9cf7; --k2: #93a9f8; --k3: #e4b8f2; }
.k3d.k3d-purple { --k1: #9b7cf6; --k2: #c49cf4; --k3: #f4c3e6; }
.k3d.k3d-coral { --k1: #ff7f78; --k2: #ffa48c; --k3: #ffd3ad; }
.k3d.k3d-teal { --k1: #36cbbf; --k2: #7cdbd6; --k3: #c2eaf6; }
.k3d.k3d-green { --k1: #5fd774; --k2: #5ad6ad; --k3: #93e4e2; }
.k3d.k3d-pink { --k1: #f26cc1; --k2: #f79ccf; --k3: #fdd0cb; }
.k3d.k3d-indigo { --k1: #6c7af2; --k2: #a0a2f6; --k3: #dbc6fa; }
.k3d .clay-ic:not(.k3) { display: none; }
html .k3d b, html .k3d .sd-kpi-main b { color: #15171d !important; font-weight: 700; text-shadow: none; }
html .k3d .sd-kpi-label, html .k3d small, html .k3d .sd-kpi-main small, html .stats div.k3d span { color: rgba(21, 23, 29, .78) !important; }
.k3d .sd-kpi-label, .stats div.k3d span { font-weight: 700; }
.k3d-art { position: absolute; top: -16px; inset-inline-end: 6px; width: 56px; height: 56px; overflow: visible; pointer-events: none; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
button.sd-kpi.k3d:hover, .sd-kpi-range.k3d:hover { transform: translateY(-2px); }
.k3d:hover .k3d-art { transform: translateY(-3px) rotate(-4deg); }
html .sd-kpi.k3d.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #15171d, 0 16px 30px -18px var(--k2) !important; }
/* אייקוני 3D קטנים (לשוניות, תפריטים, כותרות): בלי אריח מאחור, הצל יוצא מהגבולות */
svg.clay-ic.k3 { overflow: visible; filter: none !important; background: none !important; padding: 0 !important; box-shadow: none !important; }
@media (prefers-reduced-motion: reduce) { .k3d, .k3d-art { transition: none; } .k3d:hover .k3d-art { transform: none; } }
@media (max-width: 640px) {
  html .sd-kpi.k3d, html .stats div.k3d { padding-inline-end: 54px; }
  .k3d-art { width: 44px; height: 44px; top: -12px; inset-inline-end: 4px; }
}

/* בנות שירות: מקור הפניות (19.11.2026) – כפתורי פילוח שנראים כמו שורות ההתפלגות, ותג המקור בשורת המועמדת */
.sd-src-row { width: 100%; padding: 4px 6px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.sd-src-row:hover { background: rgba(0, 0, 0, .04); }
.sd-src-row.on { background: rgba(31, 111, 92, .12); box-shadow: inset 0 0 0 1px rgba(31, 111, 92, .35); }
.sd-src-row.none { opacity: .65; }
.sd-src-note { margin: 8px 0 0; font-size: 12px; opacity: .65; }
.cand-src { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(31, 111, 92, .1); font-weight: 600; }
/* כרטיס הזמנה: מאיפה הגיע הרוכש (19.11.2026, came_from_label) */
.o-src { display: inline-block; padding: 1px 8px; border-radius: 999px; background: rgba(31, 111, 92, .1); font-size: 12px; font-weight: 600; }

/* מקור הרכישות במסך ההזמנות (21.11.2026): סגור, נפתח ב-+; קומפקטי כמו "מקור הפניות" בבנות שירות */
.o-src-card { margin: 0 0 8px; max-width: 520px; padding: 12px 18px; }
.o-src-card.open { padding-bottom: 16px; }
.o-src-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 0 !important; border: 0; background: none !important; box-shadow: none !important; min-height: 0; border-radius: 0; color: inherit; font: inherit; cursor: pointer; text-align: start; }
.o-src-toggle h3 { margin: 0 !important; font-size: 15px !important; }
.o-src-card.open .o-src-toggle { margin-bottom: 10px; }
.o-src-toggle i { font-style: normal; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(31, 111, 92, .12); font-size: 18px; font-weight: 600; line-height: 1; }
.o-src-card .sd-src-row { box-shadow: none; background: none; min-height: 0; margin-bottom: 2px; font-size: 13px; }
.o-src-card .sd-src-row:hover { background: rgba(0, 0, 0, .04); }
.o-src-card .sd-src-row.on { background: rgba(31, 111, 92, .12); box-shadow: inset 0 0 0 1px rgba(31, 111, 92, .35); }
.o-src-card .sd-split { grid-template-columns: minmax(110px, auto) 1fr 30px; gap: 10px; }
.o-src-card .sd-fbar { height: 8px; }
.o-src-row > span:first-child small { opacity: .55; font-size: 11px; display: inline; }
.o-src-row.o-camp { padding-inline-start: 22px; font-size: 12px; }
.o-src-row.o-camp > span:first-child { position: relative; }
.o-src-row.o-camp > span:first-child::before { content: '↳'; position: absolute; inset-inline-start: -14px; opacity: .45; }
.o-src-row.o-camp .sd-fbar { height: 6px; opacity: .7; }
.o-src-row > span:first-child small.o-ads { display: block; font-size: 11px; opacity: .6; font-weight: 400; }
html[data-theme=dark] .o-src-card .sd-src-row:hover { background: rgba(255, 255, 255, .06); }

/* בקשות גישה של נציגי מרכזים בלשונית ההרשאות (22.11.2026) */
.car-card { margin: 0 0 16px; padding: 16px 18px; border-radius: 22px; background: rgba(255, 255, 255, .9); border: var(--glass-border); box-shadow: var(--glass-shadow); }
.car-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 10px; }
.car-head h3 { margin: 0; font-size: 16px; }
.car-head h3 em { font-style: normal; display: inline-block; min-width: 22px; padding: 0 7px; border-radius: 999px; background: #f3cf72; font-size: 12px; text-align: center; }
.car-link { font-size: 13px; color: var(--ink2); }
.car-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) 1fr auto auto; align-items: center; gap: 8px 14px; padding: 10px 0; border-top: 1px solid rgba(0, 0, 0, .06); }
.car-who { display: flex; flex-direction: column; align-items: flex-start; } .car-who span { font-size: 13px; color: var(--ink2); }
.car-row small { color: var(--ink3); font-size: 12px; }
.car-act { display: flex; gap: 8px; }
.car-card .empty { margin: 0; }
html[data-theme=dark] .car-card { background: rgba(30, 34, 40, .75); }
html[data-theme=dark] .car-row { border-top-color: rgba(255, 255, 255, .08); }
@media (max-width: 700px) { .car-row { grid-template-columns: 1fr auto; } .car-act { grid-column: 1 / -1; } }


/* רשימת לולים במסך החדרים (23.11.2026): סגורה, נפתחת ב-+ */
.crib-card { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.crib-toggle { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 0 !important; min-height: 0; border: 0; border-radius: 0; background: none !important; box-shadow: none !important; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.crib-toggle span { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.crib-toggle b { font-size: 15px; }
.crib-toggle small { color: var(--muted); font-size: 13px; }
.crib-toggle i { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(31, 111, 92, .12); font-style: normal; font-size: 18px; font-weight: 600; line-height: 1; }
.crib-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.crib-row { display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px 10px !important; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: none !important; box-shadow: none !important; color: var(--ink); font: inherit; text-align: start; cursor: pointer; }
.crib-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.crib-row .grow b { font-size: 14px; }
.crib-row .grow small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.crib-no { flex: none; min-width: 66px; font-size: 13px; font-weight: 700; }
.crib-no.none { color: #a8614f; font-weight: 600; }
.crib-ph { flex: none; font-size: 13px; color: var(--muted); }
.crib-tag { flex: none; padding: 3px 8px; border-radius: 999px; background: #fdf1d8; color: #8a5a10; font-size: 12px; font-weight: 600; }
.crib-tag.paid { background: rgba(31, 111, 92, .12); color: #1f6f5c; }
html[data-theme=dark] .crib-row { color: inherit; border-color: rgba(255, 255, 255, .14); }
html[data-theme=dark] .crib-tag { background: rgba(240, 212, 155, .16); color: #f0d49b; }
html[data-theme=dark] .crib-tag.paid { background: rgba(120, 220, 190, .14); color: #9fe6cf; }
@media (max-width: 640px) { .crib-row { flex-wrap: wrap; gap: 6px 10px; } .crib-row .grow { order: 3; flex-basis: 100%; } .crib-ph { margin-inline-start: auto; } }
@media print { .crib-card { display: none !important; } }

/* קוד כניסה מהמייל (24.11.2026) */
.login-otp { width: 100%; text-align: center; font-size: 22px !important; letter-spacing: .3em; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
#login-step-code #login-verify { width: 100%; }
#login-step-code #login-resend { margin-top: 10px; }
.login-otp:placeholder-shown { letter-spacing: normal; font-size: 17px !important; }

/* קישור להחלפה: סטטוס השליחה בתוך החלון, ושורת העתקה/ווטסאפ */
.cl-status { margin: 14px 0 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.cl-status small { font-weight: 400; color: var(--muted); }
.cl-status.none { color: var(--muted); font-weight: 500; }
.cl-status.ok { background: #e7f5ec; border-color: #b6dfc4; color: #1d6b3a; }
.cl-status.wait { background: #fff6dd; border-color: #f0dc9c; color: #7a5a00; }
.cl-status.warn, .cl-status.err { background: #fdecec; border-color: #f3c0c0; color: #a12626; }
html[data-theme=dark] .cl-status.ok { background: #16301f; border-color: #275a37; color: #8fdaa8; }
html[data-theme=dark] .cl-status.wait { background: #33290c; border-color: #5c4a14; color: #f0cf6e; }
html[data-theme=dark] .cl-status.warn, html[data-theme=dark] .cl-status.err { background: #3a1717; border-color: #6a2a2a; color: #f2a3a3; }
.cl-link { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; }
.cl-link input { flex: 1; min-width: 0; font-size: 13px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: inherit; }
.cl-link .act { white-space: nowrap; }
@media (max-width: 560px) { .cl-link { flex-wrap: wrap; } .cl-link input { flex-basis: 100%; } }
