/* ============================================================
   מערכת מעקב יציאות - עיצוב
   ------------------------------------------------------------
   שמונה גוונים חוזרים לאורך כל המערכת: אריחי מדדים, תגי כיתות
   וגרפים. לכל גוון יש שתי גרסאות - מילוי רך לרקעים, וגרסה כהה
   לטקסט. גרסאות הטקסט נבדקו ועוברות WCAG AA (4.5:1) גם על לבן
   וגם על הרקע הרך שלהן, ולכן אפשר לצבוע בלי לפגוע בקריאות.
   ============================================================ */

:root {
  /* --- זהות --- */
  --brand:      #4f46e5;
  --brand-2:    #2a78d6;
  --brand-deep: #3730a3;
  --brand-grad: linear-gradient(118deg, #4338ca 0%, #6d28d9 38%, #2a78d6 72%, #0ea5a4 100%);
  --brand-soft: linear-gradient(118deg, #eef2ff 0%, #f5f3ff 50%, #ecfeff 100%);

  /* --- משטחים --- */
  --bg:         #eef1f8;
  --bg-2:       #f7f9fc;
  --card:       #ffffff;
  --text:       #1a2233;
  --text-2:     #46536b;
  --muted:      #6b7a93;
  --line:       #e4e9f2;
  --line-soft:  #eff2f8;

  /* --- שמונה גוונים: מילוי / רקע רך / טקסט כהה --- */
  --c1: #2a78d6;  --c1-bg: #eaf2fd;  --c1-tx: #1a5cad;   /* כחול   */
  --c2: #eb6834;  --c2-bg: #fdefe8;  --c2-tx: #b8481c;   /* כתום   */
  --c3: #1baf7a;  --c3-bg: #e7f7f1;  --c3-tx: #0f7d56;   /* טורקיז */
  --c4: #eda100;  --c4-bg: #fdf5e3;  --c4-tx: #8a5d0a;   /* ענבר   */
  --c5: #e87ba4;  --c5-bg: #fdeef4;  --c5-tx: #b03567;   /* ורוד   */
  --c6: #008300;  --c6-bg: #e9f5e9;  --c6-tx: #1b6b1b;   /* ירוק   */
  --c7: #4a3aa7;  --c7-bg: #efedfa;  --c7-tx: #3d3090;   /* סגול   */
  --c8: #e34948;  --c8-bg: #fdecec;  --c8-tx: #b5322f;   /* אדום   */

  /* --- מצבים --- */
  --danger:  #c0392b;  --danger-bg:  #fdecec;
  --success: #1b6b1b;  --success-bg: #e9f5e9;
  --warn:    #8a5d0a;  --warn-bg:    #fdf5e3;

  --radius:    16px;
  --radius-sm: 11px;
  --shadow:    0 1px 2px rgba(26, 34, 51, .05), 0 4px 12px rgba(26, 34, 51, .06);
  --shadow-md: 0 2px 4px rgba(26, 34, 51, .06), 0 10px 24px rgba(26, 34, 51, .09);
  --shadow-lg: 0 8px 20px rgba(26, 34, 51, .12), 0 20px 48px rgba(26, 34, 51, .14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  direction: rtl;
  font-family: 'Segoe UI', 'Assistant', system-ui, Arial, sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% -8%, rgba(109, 40, 217, .10), transparent 42%),
    radial-gradient(circle at 88% 4%, rgba(14, 165, 164, .10), transparent 40%);
  background-attachment: fixed;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   כותרת וניווט
   ============================================================ */
.topbar {
  background: var(--brand-grad);
  color: #fff;
  padding: 15px 18px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(67, 56, 202, .28);
}

.topbar h1 {
  margin: 0 0 13px;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.3px;
}
.topbar h1 .sub {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .17);
  padding: 5px 13px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

nav.tabs { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }

nav.tabs a {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  padding: 11px 19px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px 12px 0 0;
  white-space: nowrap;
  transition: background .16s, color .16s;
}
nav.tabs a:hover { background: rgba(255, 255, 255, .18); color: #fff; }
nav.tabs a.active {
  background: var(--bg);
  color: var(--brand-deep);
  font-weight: 700;
}

/* ---------- המשתמש המחובר ---------- */
.userbox {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.userbox .who { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.userbox .role {
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, .22);
}
.userbox .role-approver { background: rgba(16, 185, 129, .6); }
.userbox .role-viewer   { background: rgba(255, 255, 255, .15); }
.userbox .logout {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: none;
  border-radius: 9px;
}
.userbox .logout:hover { background: rgba(255, 255, 255, .3); filter: none; }

/* ============================================================
   פריסה
   ============================================================ */
.wrap { max-width: 1140px; margin: 0 auto; padding: 22px 18px 48px; }
.wrap.narrow { max-width: 820px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  transition: box-shadow .2s;
}
/* פס צבע דק בראש כל כרטיס - נותן חיות בלי להעמיס */
.card::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: var(--brand-grad);
  opacity: .9;
}
.card:hover { box-shadow: var(--shadow-md); }
.card.plain::before { display: none; }

.card h2 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -.2px;
}
.card h2 .count {
  font-size: 13px;
  font-weight: 700;
  color: var(--c1-tx);
  background: var(--c1-bg);
  border-radius: 20px;
  padding: 3px 12px;
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: 15px; }

/* ============================================================
   שדות קלט
   ============================================================ */
input[type=text], input[type=search], input[type=number],
input[type=email], input[type=tel], input[type=date], select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #d8dfeb;
  border-radius: var(--radius-sm);
  font-size: 16px;           /* מונע זום אוטומטי באייפון */
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .16s, box-shadow .16s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}
input::placeholder { color: #9fadc2; }

.search-big {
  font-size: 19px !important;
  padding: 16px 19px !important;
  border-radius: 14px !important;
  border-width: 2px !important;
  box-shadow: var(--shadow);
}

label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; color: var(--text-2); }
.field { margin-bottom: 18px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 7px; font-weight: 400; line-height: 1.5; }

/* ============================================================
   כפתורים
   ============================================================ */
button, .btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 21px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  background: var(--brand-grad);
  color: #fff;
  transition: filter .16s, transform .08s, box-shadow .16s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(67, 56, 202, .26);
}
button:hover, .btn:hover { filter: brightness(1.08); box-shadow: 0 5px 16px rgba(67, 56, 202, .34); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; filter: none; box-shadow: none; }

button.ghost, .btn.ghost {
  background: #fff;
  color: var(--brand-deep);
  border-color: #d8dfeb;
  box-shadow: none;
}
button.ghost:hover, .btn.ghost:hover {
  background: #f6f5ff;
  border-color: var(--brand);
  filter: none;
  box-shadow: 0 2px 8px rgba(67, 56, 202, .12);
}

button.success { background: linear-gradient(118deg, #0f7d56, #1baf7a); box-shadow: 0 2px 8px rgba(15, 125, 86, .28); }
button.danger  { background: linear-gradient(118deg, #a5291d, #e05545); box-shadow: 0 2px 8px rgba(165, 41, 29, .28); }
button.tiny    { padding: 7px 13px; font-size: 13px; box-shadow: none; border-radius: 9px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   רשימת תוצאות חיפוש
   ============================================================ */
.results { display: flex; flex-direction: column; gap: 9px; }

.student-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  text-align: right;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  box-shadow: none;
  transition: border-color .16s, background .16s, box-shadow .16s, transform .08s;
}
.student-row:hover {
  background: #fbfcff;
  border-color: var(--brand);
  filter: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.student-row .name { font-weight: 700; font-size: 16px; }
.student-row .meta { font-size: 13px; color: var(--muted); display: block; margin-top: 3px; }
.student-row .grow { flex: 1; min-width: 0; }
.student-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

/* תג צבע לכל כיתה - הצבע נקבע לפי שם הכיתה ולא לפי מיקום ברשימה */
.cls {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  border-radius: 7px;
  padding: 2px 9px;
  white-space: nowrap;
}
.cls-1 { background: var(--c1-bg); color: var(--c1-tx); }
.cls-2 { background: var(--c2-bg); color: var(--c2-tx); }
.cls-3 { background: var(--c3-bg); color: var(--c3-tx); }
.cls-4 { background: var(--c4-bg); color: var(--c4-tx); }
.cls-5 { background: var(--c5-bg); color: var(--c5-tx); }
.cls-6 { background: var(--c6-bg); color: var(--c6-tx); }
.cls-7 { background: var(--c7-bg); color: var(--c7-tx); }
.cls-8 { background: var(--c8-bg); color: var(--c8-tx); }
.cls-0 { background: #eef1f7;      color: var(--muted); }

/* תגי מונים: שבועי (מודגש, נושא את הסף) וחודשי (משני) */
.counts { display: flex; flex-direction: column; gap: 5px; align-items: stretch; text-align: center; }

.badge {
  font-size: 13px;
  font-weight: 800;
  border-radius: 20px;
  padding: 4px 13px;
  background: var(--c1-bg);
  color: var(--c1-tx);
  white-space: nowrap;
}
.badge.soft   { background: #eff2f8; color: var(--muted); font-weight: 600; font-size: 12px; }
.badge.warn   { background: var(--warn-bg);   color: var(--warn); }
.badge.over   { background: var(--danger-bg); color: var(--danger); }
.badge.locked { background: linear-gradient(118deg, #a5291d, #e05545); color: #fff; }

/* תלמיד חסום או שמיצה מכסה - נראה כבוי, ולחיצה עליו לא רושמת */
.student-row.locked {
  background: #fcfbfc;
  border-color: #ecd8d5;
  opacity: .74;
  cursor: not-allowed;
}
.student-row.locked:hover {
  background: var(--danger-bg);
  border-color: #f0c8c2;
  box-shadow: none;
  transform: none;
}
.student-row.locked .name { text-decoration: line-through; text-decoration-color: #d0a9a4; }

/* מכסה שנותרה בטווח תאריכים */
.quota {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--c4-tx);
  background: var(--c4-bg);
  border-radius: 7px;
  padding: 2px 9px;
  margin-top: 4px;
}

/* ============================================================
   שורות "בחוץ עכשיו" ו"יציאות היום"
   ============================================================ */
.out-list { display: flex; flex-direction: column; gap: 9px; }

.out-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--warn-bg);
  border: 1.5px solid #f4e4c4;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  transition: box-shadow .16s;
}
.out-row:hover { box-shadow: var(--shadow); }
.out-row .grow { flex: 1; min-width: 0; }
.out-row .name { font-weight: 700; }
.out-row button { padding: 8px 16px; }

.out-row.calm { background: #fff; border-color: var(--line); }
.out-row.soon { background: var(--c3-bg); border-color: #c7ebdd; }

.out-row .stamp {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--c1-tx);
  background: var(--c1-bg);
  border-radius: 9px;
  padding: 5px 12px;
  font-size: 15px;
  white-space: nowrap;
}
.out-row .stamp.back {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.35;
  font-size: 13px;
}
.out-row .countdown { font-size: 11px; opacity: .78; font-weight: 700; }

.type-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 8px;
  margin-inline-end: 5px;
}
.type-tag.lunch     { background: var(--c4-bg); color: var(--c4-tx); }
.type-tag.overnight { background: var(--c7-bg); color: var(--c7-tx); }
.type-tag.override  { background: var(--danger-bg); color: var(--danger); }

/* כפתור ביטול רישום שגוי */
.cancel-x {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1.5px solid transparent !important;
  box-shadow: none !important;
  font-size: 20px;
  line-height: 1;
  padding: 5px 10px !important;
  font-weight: 700;
  border-radius: 9px;
}
.cancel-x:hover {
  background: #fff !important;
  color: var(--danger) !important;
  border-color: #f3c9c4 !important;
  filter: none;
}

/* ============================================================
   בחירת סוג יציאה
   ============================================================ */
.type-picker {
  border: 2px solid var(--brand);
  border-radius: var(--radius);
  padding: 17px;
  background: var(--brand-soft);
  box-shadow: var(--shadow-md);
}
.type-picker .picked {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 16px;
  margin-bottom: 14px;
}

.type-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 520px) { .type-buttons { grid-template-columns: 1fr; } }

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 16px;
  border-radius: 14px;
  border: none;
  color: #fff;
  text-align: center;
  line-height: 1.4;
  transition: transform .1s, box-shadow .16s, filter .16s;
}
.type-btn:hover { transform: translateY(-3px); }
.type-btn .t { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.type-btn .s { font-size: 13px; opacity: .96; font-weight: 600; }
.type-btn .n { font-size: 11px; opacity: .82; font-weight: 500; }
.type-btn.lunch     { background: linear-gradient(125deg, #d97706, #f59e0b); box-shadow: 0 6px 18px rgba(217, 119, 6, .34); }
.type-btn.overnight { background: linear-gradient(125deg, #4338ca, #7c3aed); box-shadow: 0 6px 18px rgba(67, 56, 202, .34); }

/* ============================================================
   אריחי מדדים
   ============================================================ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}
.tile {
  border-radius: var(--radius);
  padding: 19px 15px;
  text-align: center;
  border: 1.5px solid transparent;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .14s, box-shadow .18s;
}
/* בוהק עדין בפינה - נותן עומק בלי לפגוע בקריאות.
   לבן ולא currentColor בכוונה: כתם בצבע הטקסט היה מכהה את
   הרקע ומוריד את הניגודיות מתחת ל-4.5:1 באריחי הכתום והטורקיז,
   ששניהם ממילא קרובים לגבול. לבן רק מבהיר, ולכן תמיד בטוח. */
.tile::after {
  content: '';
  position: absolute;
  top: -30px;
  inset-inline-start: -30px;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.tile .value {
  font-size: 33px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -1px;
  position: relative;
}
.tile .label { font-size: 13px; margin-top: 6px; font-weight: 600; opacity: .85; position: relative; }

.tile-1 { background: var(--c1-bg); border-color: #cfe1fa; color: var(--c1-tx); }
.tile-2 { background: var(--c2-bg); border-color: #f8d9c8; color: var(--c2-tx); }
.tile-3 { background: var(--c3-bg); border-color: #c7ebdd; color: var(--c3-tx); }
.tile-4 { background: var(--c4-bg); border-color: #f5e4bb; color: var(--c4-tx); }
.tile-5 { background: var(--c5-bg); border-color: #f8d5e2; color: var(--c5-tx); }
.tile-6 { background: var(--c6-bg); border-color: #cbe6cb; color: var(--c6-tx); }
.tile-7 { background: var(--c7-bg); border-color: #d9d4f2; color: var(--c7-tx); }
.tile-8 { background: var(--c8-bg); border-color: #f7cfcf; color: var(--c8-tx); }

/* אריח שאפשר לפתוח לרשימה */
.tile.clickable { cursor: pointer; }
.tile.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile.clickable:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.tile .tile-hint { font-size: 11px; margin-top: 7px; opacity: .65; font-weight: 700; position: relative; }

/* ============================================================
   טבלאות
   ============================================================ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-sm); }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  text-align: right;
  padding: 12px 11px;
  background: linear-gradient(#f4f6fc, #eef1f8);
  border-bottom: 2px solid #dde3ee;
  font-size: 13px;
  color: #44536e;
  font-weight: 700;
  white-space: nowrap;
}
td { text-align: right; padding: 11px; border-bottom: 1px solid var(--line-soft); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f8faff; }
tr.over-threshold { background: var(--danger-bg); }
tr.over-threshold:hover { background: #fbe2df; }
tr.inactive-row { opacity: .55; }

/* ============================================================
   גרפים
   ============================================================ */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 18px; }
.chart-box { position: relative; height: 300px; }

/* ============================================================
   הודעות
   ============================================================ */
.alert-box {
  border-radius: var(--radius-sm);
  padding: 14px 17px;
  margin-bottom: 17px;
  font-size: 15px;
  border-right: 5px solid;
  line-height: 1.6;
}
.alert-box.error   { background: var(--danger-bg);  border-color: var(--danger);  color: #8c2419; }
.alert-box.ok      { background: var(--success-bg); border-color: var(--success); color: #155e33; }
.alert-box.warning { background: var(--warn-bg);    border-color: #eda100;        color: #7a5209; }
.alert-box.info    { background: var(--c1-bg);      border-color: var(--c1);      color: var(--c1-tx); }
.alert-box.danger-zone {
  background: var(--danger-bg);
  border: 1.5px solid #f3c9c4;
  border-right: 5px solid var(--danger);
  color: #8c2419;
}
.alert-box a { color: inherit; font-weight: 700; }

/* ============================================================
   טוסט
   ============================================================ */
#toast-host {
  position: fixed;
  bottom: 24px;
  inset-inline: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #1a2233;
  color: #fff;
  padding: 14px 24px;
  border-radius: 13px;
  box-shadow: var(--shadow-lg);
  font-size: 15px;
  font-weight: 600;
  max-width: 540px;
  width: fit-content;
  animation: toast-in .22s cubic-bezier(.16, 1, .3, 1);
}
.toast.ok    { background: linear-gradient(118deg, #0f7d56, #1baf7a); }
.toast.error { background: linear-gradient(118deg, #a5291d, #e05545); }
.toast.warn  { background: linear-gradient(118deg, #8a5d0a, #d19b16); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   מסך הכניסה
   ============================================================ */
.login-page {
  background: var(--brand-grad);
  min-height: 100vh;
}
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 18px 56px rgba(15, 20, 50, .34);
  padding: 38px 32px 28px;
  width: 100%;
  max-width: 410px;
  text-align: center;
}
.login-card h1 { font-size: 22px; margin: 0 0 5px; font-weight: 700; letter-spacing: -.3px; }
.login-logo { margin-bottom: 16px; }
.login-logo img { border-radius: 16px; box-shadow: 0 6px 18px rgba(67, 56, 202, .3); }
.login-card .field { text-align: right; }
.login-help { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); }

/* ============================================================
   שונות
   ============================================================ */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 13px;
  align-items: end;
}

.status-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-inline-end: 8px;
  vertical-align: middle;
}
.status-dot.ok   { background: var(--c3); box-shadow: 0 0 0 3px var(--c3-bg); }
.status-dot.bad  { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.status-dot.idle { background: #b6c0c9; }

code {
  background: var(--c7-bg);
  color: var(--c7-tx);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 13px;
  direction: ltr;
  display: inline-block;
  font-family: 'Cascadia Mono', Consolas, monospace;
}

@media (max-width: 560px) {
  .wrap { padding: 15px 13px 36px; }
  .card { padding: 16px; border-radius: 14px; }
  .tile .value { font-size: 28px; }
  .topbar h1 .sub { display: none; }
  .topbar h1 { font-size: 17px; }
  nav.tabs a { padding: 10px 14px; font-size: 14px; }
  .userbox .who b { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .student-row:hover, .tile.clickable:hover, .type-btn:hover { transform: none; }
}

@media print {
  .topbar, .filters, button, #toast-host { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .card::before { display: none; }
  body { background: #fff; background-image: none; }
}
