/* v2.2 — teachers (see CONTRACT-v2.2.md): assignment rows with a period, «Καθηγητές» / «Ύλη» on the Subjects page,
   syllabus lists (admin dialog + teacher portal), re-exam and 0Δ/0Α in the teacher portal. */

/* ---------------------------------------------------------------- assignment rows (Accounts → Καθηγητές, Subjects → Καθηγητές) */
.ta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.25fr) minmax(150px, 0.55fr) 32px; gap: 8px 10px; align-items: center; }
.ta-grid .select { width: 100%; min-width: 0; }
.ta-h { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); padding: 0 2px; }
.ta-noperiod { color: var(--faint); font-size: 13px; padding-left: 12px; }
.ta-period option { color: var(--text); }

/* ---------------------------------------------------------------- Subjects page: «Καθηγητές» column, «Ύλη» button */
.sb-table td.sb-tcell { min-width: 150px; max-width: 260px; }
.sb-teachers { display: flex; align-items: center; gap: 4px; }
.sb-tnames { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
.sb-teacher { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 2px 8px; border-radius: 99px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary); font-size: 12px; font-weight: 600; cursor: default; }
.sb-teacher.off { background: var(--surface-2); border-color: var(--border); color: var(--muted); text-decoration: line-through; }
.sb-teachers .sb-tedit { flex: none; width: 26px; height: 26px; color: var(--muted); }
.sb-teachers .sb-tedit:hover { color: var(--primary); }
.sb-teachers .sb-tedit svg { width: 14px; height: 14px; }
.sb-teachers .sb-tadd { height: 26px; padding: 0 8px; color: var(--muted); font-weight: 550; }
.sb-teachers .sb-tadd:hover { color: var(--primary); }
.sb-teachers .sb-tadd svg { width: 13px; height: 13px; }
.sb-terr { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); font-size: 12px; cursor: help; }
.sb-syl .sb-count { display: inline-block; min-width: 18px; margin-left: 2px; padding: 0 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.sb-syl.has .sb-count { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------------------------------------------------------- syllabus file list (admin dialog and teacher portal) */
.syl-list { display: flex; flex-direction: column; }
.syl-row { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-top: 1px solid #edf0f4; }
.syl-row:first-child { border-top: 0; }
.syl-row .sy-pdf { width: 26px; height: 32px; font-size: 8.5px; padding-bottom: 4px; }
.syl-main { flex: 1; min-width: 0; }
.syl-name { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syl-meta { font-size: 12px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.syl-row .btn { flex: none; }
.syl-row .btn-icon:hover { color: var(--danger); }
.syl-empty { display: flex; align-items: center; gap: 14px; padding: 18px 6px; color: var(--text-2); }
.syl-empty svg { color: var(--faint); flex: none; }
.syl-spin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--primary-line); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }

/* ---------------------------------------------------------------- teacher portal */
.tp-wrap { max-height: calc(100vh - 260px); }
.tp-lockbar { border-bottom: 1px solid var(--border); }
.tp-help { border-top: 1px solid var(--border); line-height: 1.6; }
.tp-grade.has-re { border-style: dashed; }
.tp-grade.fail:disabled { color: var(--danger); opacity: 0.75; }
.tp-re { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: var(--warning-soft); border: 1px solid #f0d9b0; color: #7a4c0a; font-size: 12px; white-space: nowrap; }
.tp-re svg { color: var(--warning); flex: none; }
.tp-re-text { color: var(--warning); }
.tp-stats { gap: 22px; margin-bottom: 12px; flex-wrap: wrap; }
.tp-stat-v { font-size: 22px; font-weight: 750; }
.tp-imp-re { max-height: 24vh; margin-bottom: 10px; border: 1px solid #f0d9b0; border-radius: var(--radius-sm); }
.tp-imp-re td:last-child { white-space: nowrap; }

/* «Ύλη» block under the grades */
.tp-sy { margin-top: 16px; }
.tp-sy .card-head h3 { display: flex; align-items: center; }
.tp-sy-n { margin-left: 8px; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; font-weight: 700; line-height: 18px; text-align: center; }
.tp-sy-list { padding: 2px 16px 6px; }
.tp-sy-empty { color: var(--muted); font-size: 12.8px; }

/* «Παρουσιάσεις» tab: today's subjects, each with its PDFs (view only) */
.tp-pres-subj { padding: 12px 18px 6px; border-top: 1px solid var(--border); }
.tp-pres-subj:first-of-type { border-top: 0; }
.tp-pres-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.tp-pres-none { padding: 6px 4px 8px; }

/* Subjects table: with «Καθηγητές» and «Ύλη» the row buttons keep only their icons (they have tooltips) on narrower screens */
@media (max-width: 1700px) {
  .sb-table .sb-lbl { display: none; }
  .sb-table td.right .btn-sm:not(.sb-syl) { padding: 0 8px; }
}

/* grade buttons: 1–5 / ΑΠ (a click on the chosen one clears it) */
.tp-gb { display: inline-flex; align-items: center; gap: 4px; }
.tp-gb .gb { min-width: 32px; height: 30px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.tp-gb .gb:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.tp-gb .gb.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tp-gb.fail .gb.on { background: var(--danger); border-color: var(--danger); }
.tp-gb .gb-ap { margin-left: 4px; font-size: 12px; }
.tp-gb .gb:disabled { cursor: default; opacity: 0.55; }
.tp-gb .gb.on:disabled { opacity: 0.8; }
.tp-gb.has-re .gb { border-style: dashed; }
.tp-gb.saving { opacity: 0.6; pointer-events: none; }
.tp-gb.saved .gb.on { box-shadow: 0 0 0 3px var(--success-soft, #d9f2e3); }
.tp-gb .gb-other { margin-left: 6px; padding: 2px 7px; border-radius: 6px; background: var(--danger-soft); color: var(--danger); font-size: 12px; font-weight: 700; }
