:root{
  --bg:#f7f8fb;--card:#fff;--ink:#0f172a;--muted:#5f6b7a;--b:#e6eaf2;
  --brand:#529af6;--ok:#22c55e;--warn:#ef4444;--partial:#f59e0b;
  --r:18px;--shadow:0 14px 36px rgba(15,23,42,.08);
}

:root{
  /* ...מה שכבר יש... */
  --border: var(--b);
  --surface: var(--card);
}

*{box-sizing:border-box} body{margin:0;background:var(--bg);font-family:system-ui,"Segoe UI",Roboto,Arial;font-size: 12px;}
.container{max-width:100%;margin:0 auto;padding:0px;margin-left: 10px;}
.topbar{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--b);backdrop-filter:blur(8px);z-index:50}
.topbar .inner{display:flex;align-items:center;padding:10px 20px}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--ink)}
.card{background:var(--card);border:1px solid var(--b);border-radius:var(--r);box-shadow:var(--shadow);padding:16px}
.grid{display:grid;gap:16px}.g-3{grid-template-columns:repeat(3,minmax(0,1fr))}.g-2{grid-template-columns:repeat(2,minmax(0,1fr));margin-top: 15px;}
.row{display:flex;gap:8px;align-items:center;margin-top: 20px}.between{justify-content:space-between}.wrap{flex-wrap:wrap}
.btn{border:1px solid var(--b);background:#fff;border-radius:14px;padding:10px 14px;cursor:pointer;font-weight:600;transition:background .15s,color .15s,border-color .15s}
.btn:hover:not(.btn-primary){background:#f8fafc}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary:focus-visible{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-danger{background:var(--warn);border-color:var(--warn);color:var(--card)}
.btn-sm{padding:6px 10px;border-radius:10px;line-height:1;height:32px;display:inline-flex;align-items:center}
.badge{display:inline-flex;align-items:center;gap:8px;border-radius:999px;padding:6px 10px;font-weight:600;color: #0e893b;font-size: 12px}
.badge.ok{background:#ecfdf5;border-color:#bbf7d0;color:#166534}
.badge.warn{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.badge.partial{background:#fffbeb;border-color:#fde68a;color:#92400e}
.select,.input{border:1px solid var(--b);border-radius:14px;padding: 15px;background:#fff;width:100%;margin-bottom: 10px;}
.logo{width:56px;height:56px;border:1px dashed var(--b);border-radius:14px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff}
.logo img{max-width:100%;max-height:100%;display:block}
.hint{color:var(--muted);font-size:12px;padding: 15px;}
.tabs{display:flex;gap:8px;flex-wrap:wrap}
.tab{border:1px solid var(--b);background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;font-weight:700;color:var(--brand);}
.tab.active{background:var(--brand);border-color:var(--brand);color:#ffffff}
.subtabs{display:flex;gap:6px;border-bottom:1px solid var(--b);padding-bottom:8px;margin-bottom:10px}
.kpi{background:#fff;border:1px solid var(--b);border-radius:16px;box-shadow:var(--shadow);padding:16px}
.kpi h4{margin:0;color:var(--muted);font-size:12px}.kpi .v{font-weight:800;font-size:22px}
table{width:100%;border-collapse:collapse;font-size:14px;margin-top: 20px}
thead th{background:#f8fafc;text-align:right;padding:8px;border-bottom:1px solid var(--b);font-weight:500}
tbody td{padding:8px;border-top:1px solid var(--b)}
tbody tr:nth-child(odd){background:#fafafa}
.actions{display:flex;gap:6px;flex-wrap:wrap;margin-top: 10px}
.filters{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:8px 0 12px}
.filters .full{grid-column:1 / -1}
tfoot td{padding:12px;border-top:2px solid var(--b);font-weight:800;background:#f8fafc}
.tfoot-summary{display:flex;justify-content:space-between;gap:12px;font-size: 16px;font-family: Arial, Helvetica, sans-serif;font-weight: 600;}
footer{opacity:.6;text-align:center;font-size:12px;padding:12px}
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(2,6,23,.45);z-index:70}
.modal.on{display:flex}
.dialog{background:#fff;border-radius:16px;box-shadow:var(--shadow);border:1px solid var(--b);width:700px;max-width:95vw;padding:16px}
.dialog .title{font-weight:800;margin-bottom:8px}
.form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form .full{grid-column:1 / -1}
.mt12{margin-top:12px}
.badge.gray{background:#eef2f7;border-color:#dbe3ee;color:#475569}

/* --- Auth UI (minimal) --- */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.auth-card{width:440px;max-width:95vw}
.auth-title{font-weight:800;font-size:20px;margin-bottom:8px}
.auth-sub{color:var(--muted);font-size:12px;margin-bottom:14px}
.auth-actions{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.link{background:none;border:none;color:var(--brand);font-weight:700;cursor:pointer;padding:0}
.center{text-align:center}

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-col { display: grid; gap: 8px; }
.profile-row { display: grid; grid-template-columns: 24px 1fr; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.profile-row .ico { display:flex; align-items:center; justify-content:center; opacity:.8; }
.profile-row .txt .label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.profile-row .txt .val { font-weight: 600; }

/* Ultra-Compact horizontal permissions grid */
.ultra-compact-perms { overflow-x: auto; }
.ultra-compact-perms .perm-table { display: table; width: 100%; border-collapse: collapse; }
.ultra-compact-perms .perm-row { display: table-row; }
.ultra-compact-perms .cell { display: table-cell; padding: 4px 6px; border: 1px solid var(--b); vertical-align: middle; }
.ultra-compact-perms .cell.first { font-weight: 600; white-space: nowrap; background: var(--card); }
.ultra-compact-perms .perm-row.header .cell { font-weight: 800; background: var(--surface); text-align: center; }
.ultra-compact-perms .select.sm { width: 100%; font-size: 12px; padding: 2px 4px; height: auto; }
/* במובייל - גלילה אופקית ושימור תא ראשון דביק */
@media (max-width: 900px){
  .ultra-compact-perms .cell.first { position: sticky; left: 0; background: var(--card); z-index: 2; }
  .ultra-compact-perms { max-width: 100%; overflow-x: auto; }
}

/* הסתרת כפתורי כתיבה במצב צפייה בלבד */
html.readonly #addVendor,
html.readonly #saveVendor,
html.readonly #vendor-add,
html.readonly #vendor-save,
html.readonly #addInvoice,
html.readonly #inv-save,
html.readonly #invoice-add,
html.readonly #invoice-save,
html.readonly #addPayment,
html.readonly #pay-save,
html.readonly #payment-add,
html.readonly #payment-save,
html.readonly #user-add,
html.readonly #u-save,
html.readonly #user-save,
html.readonly [data-ve],
html.readonly [data-vd],
html.readonly [data-ie],
html.readonly [data-id],
html.readonly [data-pe],
html.readonly [data-pd],
html.readonly [data-ue],
html.readonly [data-ud] {
  display: none !important;
}

/* שמירה על ירוק גם כשכפתור כבוי (disabled) */
.btn-primary,
button.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:disabled,
.btn-primary[disabled],
button.btn-primary:disabled,
button.btn-primary[disabled] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  opacity: 1;
  filter: none;
}
.landing-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 80px); /* פחות הטופבר */
}

.landing-card {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.landing-card h1 {
  margin-bottom: 0.5rem;
}

.landing-card p {
  margin-bottom: 1.5rem;
  color: #555;
}
.empty-topbar {
  height: 60px; /* כדי לשמור על מרווח יפה */
  background: transparent;
  border-bottom: none;
}

/* ===== מודאל חדש לתלמידים ===== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.on {
  display: flex;
}

.modal .dialog {
  background: #fff;
  width: 400px;            /* יותר רחב */
  max-height: 90vh;        /* לא יעבור 90% גובה מסך */
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.modal .title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal .form {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* שתי עמודות */
  gap: 10px 18px;
  overflow-y: auto;       /* גלילה רק בתוכן */
  padding-right: 6px;
}

#student-form-modal .form {
  max-width: 100%;        /* הטופס עצמו צר יותר מהמודאל */
  margin: 0 auto;          /* מרכז אותו באמצע */
  margin-left: 0;
  margin-right: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* עד שלושה שדות בשורה */
}

/* כותרות חלקים במודאל תלמיד – יותר מודגשות ומרוחקות */
#student-form-modal .form-section-title {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

/* שדות במודאל תלמיד – קצת יותר מרווח ונקי */
#student-form-modal .field {
  margin-bottom: 4px;
}

#student-form-modal .field label {
  font-size: 13px;
  font-weight: 500;
  color: #4b5563;
}

#student-form-modal .field .input,
#student-form-modal .field textarea,
#student-form-modal .field select {
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
}


.modal .form-section-title {
  grid-column: 1 / -1;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

.modal .field {
  display: flex;
  flex-direction: column;
}

.modal .field label {
  font-weight: 500;
  margin-bottom: 3px;
}

.modal .field .input,
.modal .field textarea,
.modal .field select {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 9px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}

.modal .field textarea {
  min-height: 70px;
  resize: vertical;
}

.modal .actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

/* כרטיס תלמיד – שורות מידע */
.modal .card-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
}

.modal .card-label {
  font-weight: 600;
  color: #6b7280;  /* אפור עדין */
  min-width: 120px;
  white-space: nowrap;
}

.modal .card-value {
  font-weight: 500;
  color: #111827;  /* כהה יותר לנתון עצמו */
}

/* שדות עיר / שכונה / רחוב – יישור שורה */
.location-row {
  display: flex;
  flex-direction: row-reverse; /* תואם RTL: כפתור משמאל, select מימין */
  align-items: center;
  gap: 6px;
}

.location-row .input {
  flex: 1; /* שה־select יקח את כל הרוחב */
}

.location-row .btn.btn-sm {
  padding-inline: 8px;
  min-width: 32px;
}

.location-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;   /* הכפתור וה-select באותו גובה */
  gap: 2px;
}

.location-row .input {
  flex: 1;
}

.location-row .btn.btn-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 37px;          /* אותו גובה כמו ה-input בערך */
  padding-inline: 8px;
  min-width: 32px;
}

/* ===== layout חדש: טאבים כתפריט צד ===== */

.side-layout {
  display: flex;
  flex-direction: row; /* טאבים ימין, תוכן שמאל */
  gap: 16px;
}

/* עמודת הטאבים */
.side-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

/* כפתור טאב ראשי בעמודת הצד */
.side-tabs .tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-align: right;
}

/* אזור התוכן */
.side-content {
  flex: 1;
}

/* ===== layout מוסד: תפריט צד שמאל + תוכן מימין ===== */

.tenant-layout {
  display: flex;
  flex-direction: row;   /* צד שמאל – תפריט, צד ימין – תוכן */
  gap: 16px;
  align-items: stretch;
}

/* עמודת תפריט שמאלית */
.tenant-sidebar {
  width: 230px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 12px;
}

/* טאבים אנכיים בתוך הסיידבר */
.tenant-sidebar .tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* כל טאב תופס רוחב מלא, עדיין עם העיצוב העגול שלך */
.tenant-sidebar .tab {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  text-align: right;
}

/* אזור התוכן */
.tenant-main {
  flex: 1;
  min-width: 0;
}

/* ===== layout מוסד: סרגל צד שמאל + תוכן מימין ===== */

.tenant-layout {
  display: flex;
  flex-direction: row; /* שמאל = סרגל, ימין = תוכן */
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

/* סרגל צד */
.tenant-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  padding: 10px 8px;
  transition: width 0.25s ease;
  overflow: hidden;
}

/* סרגל פתוח / סגור */
.tenant-sidebar.sidebar-open {
  width: 230px;
  min-width: 230px;
}

.tenant-sidebar.sidebar-closed {
  width: 64px;
  min-width: 64px;
}

/* כפתור toggle למעלה */
.sidebar-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: center;
  padding: 4px;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--muted);
}

/* קבוצת הטאבים בסיידבר */
.sidebar-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* טאב בסיידבר – משתמש ב.tab הקיים שלך, רק מוסיף מבנה */
.sidebar-tab {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* אייקון בטאב */
.sidebar-tab .tab-icon {
  font-size: 18px;
  color: #4b5563; /* אפור עדין */
  margin-left: 8px;
}

.sidebar-tab.active .tab-icon {
  color: #ffffff; /* כשסגור והטאב ירוק */
}

/* טקסט הטאב */
.sidebar-tab .tab-label {
  white-space: nowrap;
}

/* כשסגור – מסתירים טקסט ומשאירים רק אייקונים */
.tenant-sidebar.sidebar-closed .tab-label {
  display: none;
}

/* כשסגור – ממרכזים את האייקונים */
.tenant-sidebar.sidebar-closed .sidebar-tab {
  justify-content: center;
}

.tenant-main {
  flex: 1;
  min-width: 0;
}

/* ===== layout מוסד – סרגל צד + תוכן ===== */

.tenant-layout {
  display: flex;
  flex-direction: row; /* ימין = תוכן, שמאל = סרגל (בר״תל) */
  gap: 16px;
  align-items: flex-start;
  margin-top: 16px;
}

.tenant-sidebar {
  width: 230px;
  min-width: 230px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 10px 8px;
}

.tenant-main {
  flex: 1;
  min-width: 0;
}

/* כפתור פתיחה/סגירה למעלה */
.sidebar-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px;
  margin-bottom: 8px;
  font-size: 18px;
  color: var(--muted);
}

/* טאבים בסרגל – אנכיים */
.sidebar-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* טאב צד – מלבני, לא עגול */
.sidebar-tab {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f9fafb;
  color: #374151;
  font-weight: 500;
}

/* --- מצב סרגל סגור: למרכז את האייקון בריבוע --- */
.tenant-sidebar.sidebar-closed .sidebar-tab {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
}

/* ביטול מרווחים של האייקון במצב סגור */
.tenant-sidebar.sidebar-closed .tab-icon {
    margin: 0;
}

/* --- מצב סרגל פתוח: התנהגות רגילה --- */
.tenant-sidebar.sidebar-open .sidebar-tab {
    padding: 8px 12px;
    width: 100%;
    height: auto;
    justify-content: flex-start;
}

/* טקסט */
.sidebar-tab .tab-label {
  white-space: nowrap;
}

/* טאב פעיל */
.sidebar-tab.active,
.sidebar-tab.tab.active {
  background: #529af6;
  color: #ffffff;
  border-color: #529af6;
}

/* מצב סגור – רק אייקונים, ברוחב צר */
.tenant-sidebar.sidebar-closed {
  width: 64px;
  min-width: 64px;
}

.tenant-sidebar.sidebar-closed .tab-label {
  display: none;
}

.tenant-sidebar.sidebar-closed .sidebar-tab {
  justify-content: center;
  padding-inline: 0;
}

/* ===== טופס תלמידים – מודאל רחב ומסודר ===== */

.dialog.student-form-dialog {
  max-width: 1300px;
  max-height: 99vh;
  width: 99%;
}

.dialog.student-form-dialog .form {
  max-height: none;      /* לא מגביל גובה */
  overflow-y: visible;   /* בלי פס גלילה פנימי */
}

/* מעטפת של שלושת הקופסאות */
.student-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* קופסה אחת (כרטיס תלמיד / פרטי הורים / שונות) */
.student-section {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  padding: 16px 20px;
}

/* כותרת של כל קופסה */
.student-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #111827;
}

/* השורה הפנימית של השדות בכל קופסה */
.student-section-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 8px;
}

/* לא לצבור מרווחים כפולים */
.student-section-row .field {
  margin-bottom: 0;
}

/* מודאל תלמידים – מבטל את ה-grid הכללי */
#student-form-modal .form {
  display: block;          
  max-width: 100%;       /* קצת יותר רחב – מנצל את החלון */
  margin: 0 auto;
  margin-left: 0;
  margin-right: 0;
  overflow-y: auto;
}

/* ===========================
   כרטיס תלמיד – עיצוב חדש
   =========================== */

/* גודל חלון הכרטיס */
#student-card-modal .dialog {
  width: 80%;
  max-width: 99vw;
}

/* מעטפת כללית */
#student-card-modal .form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 26px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

/* קופסה אחת */
.student-card-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* כותרת הקופסה */
.student-card-section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #374151;
}

/* אזור השדות בתוך הקופסה */
.student-card-section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px 32px;
}

/* שורה אחת (לייבל + ערך) */
.student-card-row {
  min-height: 32px;      /* <<< מבטיח שלא יתכווץ */
  display: flex;
  gap: 6px;
  align-items: center;
}

/* לייבל */
.student-card-label {
  font-weight: 600;
  color: #6b7280;
  min-width: 93px;
  white-space: nowrap;
}

/* ערך */
.student-card-value {
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  color: #111827;
  background: var(--b);
  border-radius: 6px;         /* "צ'יפ" עדין */
  padding: 4px 10px;
  min-height: 26px;          /* <<< גובה מינימלי לשורה */
  min-width: 127px;
  display: inline-block;
}

/* ===== Error modal for students.js ===== */
.error-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 120; /* מעל המודל של התלמידים */
}

.error-modal {
  direction: rtl;
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.error-modal__title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-modal__body {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 24px;
}

.error-modal__actions {
  display: flex;
  justify-content: flex-start; /* ב־RTL זה מצמיד לימין */
  gap: 8px;
}

/* ===== Info modal for students (openInfoModal) ===== */
.student-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998; /* מעל התוכן הרגיל */
}

.student-modal {
  direction: rtl;
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.student-modal-header h2 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 600;
}

.student-modal-body p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.student-modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-start; /* ב-RTL זה לימין */
  gap: 8px;
}

.dashboard-hero { padding:18px; }
.dashboard-title { font-size:22px; font-weight:900; }
.dashboard-sub { margin-top:6px; }
.dashboard-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.dashboard-stat { padding:14px; }
.dashboard-stat-val { font-size:20px; font-weight:900; margin-top:6px; }
.dashboard-note { padding:16px; }

.topbar .inner{
  display:flex;
  align-items:center;
  direction:rtl;
  gap:12px;
}

.topbar-right, .topbar-left{
  display:flex;
  align-items:center;
  gap:12px;
}

.topbar-spacer{ flex:1; }

.topbar-logo{
  height:56px;
  display:block;
  cursor:pointer;
}

.topbar-tenant-name{
  font-size:18px;
  font-weight:800;
}

.topbar-nm{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  line-height:1.5;
}

.topbar,
.topbar *{
  font-family: system-ui, "Segoe UI", Roboto, Arial; font-weight: bold;
}

.topbar-user-name{
  font-size:13px;
  color:#334155;
  margin-top:2px;
  font-weight: normal;
}


.logo {
  width: 48px;        /* או מה שמתאים לך */
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Confirm overlay - תמיד מעל כל מודאל */
.app-confirm-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483647;   /* גבוה במיוחד */
}

/* חלון האישור */
.app-confirm-modal{
  background: #fff;
  border-radius: 14px;
  max-width: 520px;
  width: calc(100% - 24px);
  padding: 16px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.app-confirm-modal .actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top: 14px;
}

/* שכבות אחידות */
.modal{ z-index: 1000; }             /* מודאלים רגילים (כרטיס תלמיד וכו') */
.app-confirm-overlay{ 
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;          /* אישור תמיד מעל מודאל רגיל */
}

#app-msgs{ z-index: 3000 !important; } /* הודעות/טוסטים מעל הכל */


td.bank-credit { color: #0a7a2f; font-weight: 600; }
td.bank-debit  { color: #b00020; font-weight: 600; }


.table-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  font-size: 13px;
}

.pager-left {
  display: flex;
  gap: 8px;
}

.pager-right {
  color: #6b7280;
}
