/* Πρόγραμμα σχολής: classes × days grid (subject + teachers), teachers / subjects side panel, cell dialog.
   Subject colours (.cs-0 … .cs-9, .cs-x) and .cal-sw come from css/calendar.css. */

.pr-bar { margin-bottom: 10px; gap: 8px; }
.pr-filters { margin-bottom: 14px; }
.pr-title { min-width: 200px; text-align: center; font-size: 15px; font-weight: 700; }
.pr-level, .pr-teacher { width: auto; min-width: 150px; max-width: 220px; }
.pr-wkend { margin-left: 4px; }
.pr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; align-items: start; }
@media (max-width: 1240px) { .pr-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- the grid */
.pr-card { overflow: hidden; }
.pr-wrap { max-height: calc(100vh - 230px); overflow: auto; }
.pr-grid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: 12.5px; }
.pr-grid th, .pr-grid td { border-right: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; }
.pr-grid thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); padding: 7px 8px; text-align: center; font-weight: 650; color: var(--text-2); }
.pr-grid thead th.today { background: var(--primary-soft); color: var(--primary); }
.pr-grid thead th.wkend { color: var(--faint); }
.pr-cls-h, .pr-cls { position: sticky; left: 0; z-index: 2; width: 220px; text-align: left !important; background: var(--surface); }
.pr-grid thead .pr-cls-h { z-index: 4; background: var(--surface-2); }
.pr-wd { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.pr-dm { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-grid:not(.pr-month) .pr-date { width: auto; }
.pr-month .pr-date { width: 132px; }
.pr-month { width: max-content; min-width: 100%; }
.pr-cls { padding: 7px 10px; vertical-align: middle; }
.pr-cname { font-weight: 650; font-size: 12.5px; line-height: 1.3; }
.pr-cmeta { font-size: 11px; color: var(--muted); }
.pr-lvrow th { position: sticky; left: 0; background: #f4f6f9; padding: 5px 10px; text-align: left; font-size: 11px; font-weight: 750; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.pr-cell { padding: 3px; vertical-align: top; background: var(--surface); }
.pr-cell.wkend { background: #fafbfc; }
.pr-cell.today { background: #f7faff; }
.pr-btn { display: flex; flex-direction: column; gap: 3px; width: 100%; min-height: 50px; padding: 4px; border: 1px solid transparent; border-radius: 7px; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pr-btn:hover { border-color: var(--primary-line); background: #f6f9fd; }
.pr-btn:focus-visible { outline: none; border-color: var(--primary); }
.pr-empty { align-items: center; justify-content: center; color: var(--faint); font-size: 16px; font-weight: 300; }
.pr-empty:hover { color: var(--primary); }
.pr-subj { display: block; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 700; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pr-teach { display: flex; align-items: center; gap: 4px; padding: 0 4px; font-size: 11.5px; color: var(--text-2); line-height: 1.3; overflow: hidden; }
.pr-teach.auto { font-style: italic; color: var(--muted); }
.pr-teach.none { color: var(--danger); font-style: normal; font-weight: 600; }
.pr-teach svg { flex: none; color: var(--danger); }
.pr-cell.dim .pr-btn { opacity: 0.32; }
.pr-cell.dim .pr-btn:hover { opacity: 0.8; }
.pr-cell.clash .pr-btn { border-color: #f0c9c9; background: #fff8f8; }
.pr-foot { border-top: 1px solid var(--border); line-height: 1.6; }
.pr-foot svg { vertical-align: -2px; color: var(--danger); }

/* ---------------------------------------------------------------- side panel */
.pr-side { display: flex; flex-direction: column; gap: 14px; }
.pr-tlist, .pr-slist, .pr-issues { padding: 6px 0; max-height: 36vh; overflow: auto; }
.pr-t { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; width: 100%; padding: 7px 16px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.pr-t:hover { background: var(--surface-2); }
.pr-t.on { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.pr-t.none { opacity: 0.6; }
.pr-t-name { flex: 1; min-width: 0; font-weight: 650; font-size: 13px; }
.pr-t-n { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
.pr-s { display: flex; align-items: flex-start; gap: 10px; padding: 6px 16px; }
.pr-s .cal-sw { margin-top: 4px; }
.pr-s-main { flex: 1; min-width: 0; }
.pr-s-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-s-meta { font-size: 11.5px; color: var(--muted); }
.pr-issue { display: flex; align-items: flex-start; gap: 8px; width: 100%; padding: 6px 16px; border: 0; background: transparent; font: inherit; font-size: 12px; color: var(--text-2); text-align: left; cursor: pointer; line-height: 1.45; }
.pr-issue:hover { background: var(--surface-2); }
.pr-issue svg { flex: none; margin-top: 2px; color: var(--muted); }
.pr-issue.clash svg { color: var(--danger); }

/* ---------------------------------------------------------------- cell dialog */
.pr-tbox { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.pr-tchk .badge { margin-left: 4px; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #f0c9c9; }

/* ---------------------------------------------------------------- teacher portal: «Πρόγραμμα» */
.tp-prog-week { padding: 8px 18px 4px; font-size: 11px; font-weight: 750; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); background: #f7f9fb; border-top: 1px solid var(--border); }
.tp-prog-day { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; padding: 8px 18px; border-top: 1px solid #eef1f5; align-items: start; }
.tp-prog-day.today { background: #f5f9ff; box-shadow: inset 3px 0 0 var(--primary); }
.tp-prog-day.past { opacity: 0.6; }
.tp-prog-date b { display: block; font-size: 13px; }
.tp-prog-date span { font-size: 11.5px; color: var(--muted); }
.tp-prog-items { display: flex; flex-direction: column; gap: 5px; }
.tp-prog-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.tp-prog-item .pr-subj { display: inline-block; }
.tp-prog-item .muted { font-size: 12px; }

/* ---------------------------------------------------------------- month: a calendar like «Ημερολόγιο & απουσίες» */
.pr-mday { cursor: pointer; }
.pr-mday:not(.out):hover { background: #f6f9fd; box-shadow: inset 0 0 0 2px var(--primary-line); }
.pr-mhead { display: flex; align-items: center; justify-content: space-between; }
.pr-madd { width: 20px; height: 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; color: var(--faint); visibility: hidden; }
.pr-mday:hover .pr-madd { visibility: visible; color: var(--primary); background: var(--primary-soft); }
.pr-mline { width: 100%; border: 1px solid transparent; font: inherit; text-align: left; cursor: pointer; }
.pr-mline:hover { border-color: currentColor; }
.pr-mline.clash { border-color: #e7a3a3; box-shadow: inset 3px 0 0 var(--danger); }
.pr-mteach { display: block; font-size: 10.5px; font-weight: 600; opacity: 0.85; }
.pr-mteach.auto { font-style: italic; }
.pr-mteach.none { color: var(--danger); font-style: normal; }
.pr-mteach svg { vertical-align: -1px; margin-right: 2px; color: var(--danger); }

/* the month calendar takes the full width; the teachers / subjects / checks go below it in three columns */
.pr-month-layout { grid-template-columns: minmax(0, 1fr); }
.pr-month-layout .pr-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .pr-month-layout .pr-side { grid-template-columns: minmax(0, 1fr); } }
.pr-mline { font-size: 11.5px; overflow-wrap: break-word; }

/* class terms: the class header shows its dates (click: change them); days outside the term are hatched */
.pr-cls[data-action] { cursor: pointer; }
.pr-cls[data-action]:hover { background: #f6f9fd; }
.pr-cterm { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 11px; font-weight: 650; color: var(--primary); }
.pr-cterm.none { color: var(--faint); font-weight: 500; }
.pr-cell.off-term { background: repeating-linear-gradient(135deg, #f6f7f9 0 6px, #eef1f5 6px 12px); }

/* a lesson's comment */
.pr-note, .pr-mnote { display: block; padding: 0 4px; font-size: 11px; font-style: italic; color: #8a5a00; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-note::before, .pr-mnote::before, .cal-note::before { content: '✎ '; font-style: normal; }
.pr-mnote { padding: 0; font-size: 10.5px; }
.cal-note { display: block; font-size: 10.5px; font-style: italic; color: #8a5a00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the e-mail to the teachers: the Outlook signature's preview */
.pm-sigbox { margin-top: 6px; border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.pm-sigbox iframe { display: block; width: 100%; height: 170px; border: 0; background: #fff; }
.pm-signote { padding: 10px 12px; }
