/* ============================================================
   מסך התלמידים
   ============================================================ */

.stu-filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin: 16px 0 18px;
}
.stu-filters input[type="search"] { flex: 1 1 240px; min-width: 0; }
/* רוחב מפורש לתפריטים: app.css נותן לשדות width:100%, ובלי
   הביטול הזה כל פקד תופס שורה שלמה במקום לשבת בשורה אחת. */
.stu-filters select { flex: 0 0 auto; width: auto; min-width: 140px; }
.stu-filters input, .stu-filters select {
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: inherit;
  font-size: .98rem; font-family: inherit;
}
.stu-count { opacity: .65; font-size: .9rem; margin-inline-start: auto; }

.stu-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.stu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
}
.stu-card.inactive { opacity: .5; }

.stu-photo-wrap { position: relative; }
.stu-photo {
  width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block;
  background: var(--surface-2);
}
.stu-photo.none {
  display: grid; place-items: center; font-size: 2.6rem; opacity: .3;
}

/* כפתור החלפת תמונה - מופיע על התמונה עצמה */
.stu-photo-btn {
  position: absolute; inset-inline-end: 8px; inset-block-end: 8px;
  border: 0; border-radius: 8px; cursor: pointer;
  background: rgba(15,23,42,.72); color: #fff;
  padding: 5px 9px; font-size: .78rem; font-family: inherit;
}
.stu-photo-btn:hover { background: rgba(15,23,42,.9); }

/* תג בולט לתלמיד בלי תמונה - זה בדיוק מה שמחפשים במסך הזה */
.stu-nophoto-tag {
  position: absolute; inset-block-start: 8px; inset-inline-start: 8px;
  background: var(--warn); color: #fff; border-radius: 999px;
  padding: 2px 9px; font-size: .74rem; font-weight: 600;
}

.stu-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; }
.stu-name { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.stu-meta { font-size: .84rem; opacity: .7; display: flex; gap: 7px; flex-wrap: wrap; }
.stu-actions { display: flex; gap: 6px; margin-top: 6px; }
.stu-actions .btn { flex: 1; padding: 7px; font-size: .84rem; }

.stu-empty { opacity: .6; padding: 40px 4px; text-align: center; }

/* ---------- דיאלוגים ---------- */
.stu-dialog {
  border: 0; border-radius: 16px; padding: 22px;
  background: var(--surface); color: inherit;
  max-width: 92vw; box-shadow: var(--shadow-lg);
}
.stu-dialog::backdrop { background: rgba(15,23,42,.55); }
.stu-dialog h2 { margin: 0 0 14px; font-size: 1.15rem; }
.stu-dialog label { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.stu-dialog label > span { font-size: .84rem; opacity: .75; }
.stu-dialog input[type="text"] {
  padding: 10px; border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: inherit;
  font-size: 1rem; font-family: inherit;
}
.stu-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }

/* ---------- חיתוך ---------- */
.crop-hint { font-size: .86rem; opacity: .7; margin: 0 0 12px; line-height: 1.5; }
.crop-stage {
  position: relative; width: 360px; max-width: 84vw;
  aspect-ratio: 1/1; margin: 0 auto;
  background: #0f172a; border-radius: 12px;   /* במת החיתוך כהה תמיד - ניגודיות לתמונה */ overflow: hidden;
  touch-action: none; cursor: grab;
}
.crop-stage:active { cursor: grabbing; }
#cropCanvas { width: 100%; height: 100%; display: block; }
/* מסגרת מנחה - החלק שיישמר */
.crop-mask {
  position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
  border-radius: 12px;
}
#cropZoom { width: 100%; margin: 14px 0 0; }

.stu-meta.blocked { color: var(--danger); font-weight: 600; }
