/* Calendar & absences: class calendar (one subject per day), absence summary, over-the-limit marks in exams,
   the «Απουσίες» tab of the teacher portal and the "not eligible" card of the student portal. */

/* ---------------------------------------------------------------- subject colours (per class, in subject order) */
.cs-0 { background: #e5eefa; color: #1e5fa6; }
.cs-1 { background: #fbece3; color: #b4521d; }
.cs-2 { background: #e3f4e9; color: #1b7f4b; }
.cs-3 { background: #efe8fb; color: #6a3fb5; }
.cs-4 { background: #def3f3; color: #0f7070; }
.cs-5 { background: #fbe7f0; color: #b1306e; }
.cs-6 { background: #f1ebe2; color: #7a5b33; }
.cs-7 { background: #eef3dd; color: #5f7414; }
.cs-8 { background: #e6e8fb; color: #3b44a8; }
.cs-9 { background: #fdf3e2; color: #a8690f; }
.cs-x { background: #eef1f5; color: var(--muted); }

/* ---------------------------------------------------------------- page bar */
.cal-bar { margin-bottom: 14px; gap: 10px; }
.cal-cls { width: auto; min-width: 280px; max-width: 460px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1180px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- month grid */
.cal-card { overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.cal-month { font-size: 15px; font-weight: 700; min-width: 160px; text-align: center; }
.cal-hint { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-wd { padding: 7px 10px; font-size: 11px; font-weight: 650; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-wd.wkend { color: var(--faint); }
.cal-day { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-height: 84px; padding: 6px 7px 7px; border: 0; border-right: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.cal-grid > :nth-child(7n) { border-right: 0; }
button.cal-day:hover { background: #f6f9fd; box-shadow: inset 0 0 0 2px var(--primary-line); }
button.cal-day:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.cal-day.wkend { background: #fafbfc; }
.cal-day.out { background: #f6f7f9; color: var(--faint); cursor: default; }
.cal-dnum { align-self: flex-start; min-width: 22px; padding: 1px 6px; border-radius: 99px; font-size: 12px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-dnum { background: var(--primary); color: #fff; }
.cal-subj { display: block; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-abs { font-size: 11px; font-weight: 650; color: var(--danger); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- legend */
.cal-leg-list { padding: 6px 0; }
.cal-leg { display: flex; align-items: center; gap: 10px; padding: 7px 16px; }
.cal-leg.none { opacity: 0.6; }
.cal-sw { flex: none; width: 12px; height: 12px; border-radius: 4px; }
.cal-leg-main { flex: 1; min-width: 0; }
.cal-leg-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-leg-meta { font-size: 11.5px; color: var(--muted); }
.cal-over { flex: none; border: 1px solid #f0c9c9; background: var(--danger-soft); color: var(--danger); border-radius: 99px; padding: 2px 8px; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cal-over:hover { border-color: var(--danger); }
.cal-leg-foot { border-top: 1px solid var(--border); line-height: 1.55; }

/* ---------------------------------------------------------------- hour toggles (day dialog + teacher portal) */
.hr-tog { display: inline-flex; align-items: center; gap: 4px; }
.hr { min-width: 30px; height: 28px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 650; cursor: pointer; font-variant-numeric: tabular-nums; }
.hr:hover { border-color: var(--danger); color: var(--danger); }
.hr.on { background: var(--danger); border-color: var(--danger); color: #fff; }
.hr.hr-all { margin-left: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.hr.hr-all.on { background: var(--danger-soft); border-color: #f0c9c9; color: var(--danger); }
.hr:disabled { opacity: 0.6; cursor: progress; }

/* justified (δικαιολογημένες) hours: green instead of red */
.hr-tog.just .hr.on, .hr.on.just { background: var(--success); border-color: var(--success); color: #fff; }
.hr-tog.just .hr:hover { border-color: var(--success); color: var(--success); }
.hr-tog.just .hr.on:hover { color: #fff; }
.hr-tog.just .hr.hr-all.on { background: var(--success-soft); border-color: #bfe3cf; color: var(--success); }
.hr.on.just:disabled { opacity: 1; cursor: not-allowed; }
.cd-just { white-space: nowrap; }
.cd-just .select { width: auto; min-width: 150px; height: 28px; padding-top: 0; padding-bottom: 0; font-size: 12.5px; }
.cd-just .select:disabled { opacity: 0.45; }
.cd-just .select.cj-on { border-color: #9fd4b6; color: var(--success); background-color: var(--success-soft); font-weight: 600; }
.cd-just .input { width: 210px; height: 28px; font-size: 12.5px; margin-left: 6px; }
.abs-just { display: block; font-size: 10.5px; font-weight: 600; color: var(--success); line-height: 1.2; }
.just-chip { display: inline-block; border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.just-chip.on { background: var(--success-soft); color: var(--success); }
.al-note { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- fill dialog, day dialog */
.cf-days { gap: 6px 14px; }
.cd-wrap { max-height: 46vh; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cd-wrap td.num .badge { margin-left: 4px; }

/* ---------------------------------------------------------------- absence summary */
.abs-wrap { max-height: calc(100vh - 290px); }
.abs-table th { vertical-align: bottom; }
.abs-th-sub { font-size: 10.5px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--faint); white-space: nowrap; }
.abs-cell { min-width: 44px; border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 2px 7px; font: inherit; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--text); }
.abs-cell:hover { border-color: var(--border-strong); background: var(--surface-2); }
.abs-cell.zero { color: var(--faint); font-weight: 500; cursor: default; }
.abs-cell.zero:hover { border-color: transparent; background: transparent; }
.abs-cell.at { color: var(--warning); background: var(--warning-soft); }
.abs-cell.over { color: var(--danger); background: var(--danger-soft); border-color: #f0c9c9; }
.abs-of { color: var(--faint); font-weight: 500; margin-left: 1px; }
.abs-cell.over .abs-of, .abs-cell.at .abs-of { color: inherit; opacity: 0.7; }
.abs-over-row td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.abs-foot { border-top: 1px solid var(--border); line-height: 1.55; }

/* ---------------------------------------------------------------- exams (admin): absences column */
.ex-abs { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ex-abs.over { color: var(--danger); font-weight: 700; }
.ex-abs .badge { margin-left: 4px; }
.ex-allow { margin-left: 4px; }

/* ---------------------------------------------------------------- student portal: not eligible because of absences */
.exam-card.barred { border-color: #f0c9c9; }
.exam-card.barred .ec-date { background: var(--danger-soft); border-color: #f0c9c9; }
.exam-card.barred .ec-date .d { color: var(--danger); }
.ec-barred { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); border: 1px solid #f0c9c9; color: #8f2a2a; font-size: 12.8px; line-height: 1.5; }
.ec-barred svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--danger); }

/* ---------------------------------------------------------------- student portal: Absences tab */
.ab-total { margin-top: 16px; font-size: 13.5px; color: var(--text-2); }
.ab-n { font-size: 12.5px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.ab-n.at { color: #b26a00; }
.ab-n.over { color: var(--danger); }
.ab-days { display: flex; flex-direction: column; }
.ab-day { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 18px; border-top: 1px solid #edf0f4; font-size: 13.5px; }
.ab-day:first-child { border-top: 0; }
.ab-hours { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- teacher portal: Βαθμοί | Απουσίες */
.tp-tabs { margin-right: 4px; }
.tp-abs-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--border); }
.tp-abs-date { width: auto; min-width: 240px; }
.tp-abs-table td.chk { width: 44px; }
.tp-abs-table tr.absent td { background: #fff6f6; }
.tp-abs-table input[type='checkbox'] { width: 17px; height: 17px; accent-color: var(--danger); cursor: pointer; }
.tp-abs-n { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tp-abs-n.over { color: var(--danger); font-weight: 700; }
.tp-abs-n.at { color: var(--warning); font-weight: 650; }
.tp-abs-table tr.saving td { opacity: 0.6; }

/* ---------------------------------------------------------------- overall month: every class, the subject's title */
.cal-level { width: auto; }
.cal-grid-all { grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, 0.55fr)); }
.cal-all .cal-day { min-height: 98px; gap: 3px; padding: 5px 5px 6px; }
.cal-line { display: block; min-width: 0; padding: 2px 6px; border-radius: 5px; font-size: 11.5px; line-height: 1.35; overflow-wrap: break-word; }
.cal-ctag { margin-right: 5px; font-size: 10px; font-weight: 750; letter-spacing: 0.1px; opacity: 0.8; white-space: nowrap; }
.cal-ltxt { font-weight: 650; }
.cal-labs { display: inline-block; margin-left: 5px; font-style: normal; font-size: 10px; font-weight: 750; color: #fff; background: var(--danger); border-radius: 99px; padding: 0 5px; line-height: 15px; vertical-align: 1px; }
.cal-more { padding-left: 4px; font-size: 11px; font-weight: 650; color: var(--muted); }
.cal-all-foot { border-top: 1px solid var(--border); }
.cal-subj-name { font-size: 11.5px; font-weight: 600; line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cf-classes { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.cd-all { max-height: 60vh; }
.cd-all .select { height: 30px; font-size: 12.5px; min-width: 220px; }

/* teachers of a day (from «Πρόγραμμα») */
.cal-lteach { display: block; font-size: 10.5px; font-weight: 600; opacity: 0.8; }
.cal-teach { font-size: 11px; color: var(--muted); line-height: 1.3; }

/* class terms (start / end date of a class) */
.cal-term { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 8px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.cal-term svg { vertical-align: -2px; color: var(--muted); }
.cal-day.off-term { background: repeating-linear-gradient(135deg, #f6f7f9 0 6px, #eef1f5 6px 12px); color: var(--faint); }
.cal-day.off-term .cal-dnum { opacity: 0.6; }
tr.off-term td { background: #fafbfc; }
.ct-wrap { max-height: 50vh; }
.ct-wrap .input { height: 30px; font-size: 12.5px; }
.ct-new { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.ct-new .label { font-weight: 650; font-size: 12.5px; margin-bottom: 6px; }
.ct-new .select { width: auto; min-width: 110px; }
tr.ct-added td { background: var(--primary-soft); }
.cal-lnote { margin-left: 4px; font-style: normal; font-size: 10px; color: #8a5a00; }

/* ---------------------------------------------------------------- student portal: certificate of studies */
.cert-locked svg { color: var(--muted); }
.cert-preview { margin: 0 0 30px; }

/* ---------------------------------------------------------------- student portal: notices */
.nt-list { display: flex; flex-direction: column; gap: 10px; }
.nt-card.unread { border-left: 3px solid var(--primary); }
.nt-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 2px; }
.nt-text { margin-top: 10px; white-space: pre-wrap; line-height: 1.55; }
.nt-body { max-width: 520px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-all .cd-note { height: 30px; font-size: 12.5px; min-width: 170px; }

/* ---------------------------------------------------------------- student card: certificate of studies */
.cert-admin { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 22px; align-items: start; }
.cert-admin-form { min-width: 0; }
.cert-admin-preview { min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
@media (max-width: 1100px) { .cert-admin { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- training courses (σεμινάρια): many a day, no class */
.crs-line { background: #efe9fb; color: #4b2f8a; }
.crs-line.crs-PM { background: #f8ebf6; color: #7a2a6b; }
.crs-line .cal-ctag { opacity: 1; }
.crs-codes { font-weight: 600; font-size: 11px; }
.crs-nt { display: inline-block; margin-left: 5px; font-style: normal; font-size: 10px; font-weight: 750; color: #fff; background: var(--danger); border-radius: 99px; padding: 0 5px; line-height: 15px; vertical-align: 1px; }
.crs-in { display: flex; flex-direction: column; gap: 3px; cursor: pointer; border-radius: 6px; }
.crs-in:hover .crs-line { filter: brightness(0.96); }
.crs-inday { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 10px 12px; border-radius: 9px; background: #f4f0fc; border: 1px solid #e2d8f6; font-size: 13px; }
.crs-month .cal-day { min-height: 110px; }
/* the day dialog */
.crs-add { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--surface-2); margin-bottom: 14px; }
.crs-add #crs-q { flex: 1; min-width: 220px; }
.crs-list { margin-top: 10px; max-height: 230px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); padding: 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.crs-opt { display: flex; align-items: baseline; gap: 8px; padding: 5px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; min-width: 0; }
.crs-opt:hover { background: var(--surface-2); }
.crs-opt input { flex: none; position: relative; top: 2px; }
.crs-opt b { flex: none; font-size: 12px; color: var(--primary); min-width: 36px; }
.crs-opt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crs-opt i { flex: none; margin-left: auto; font-size: 11px; font-style: normal; color: var(--success); }
.crs-opt.done { opacity: 0.6; cursor: default; }
.crs-none { padding: 10px; grid-column: 1 / -1; }
.crs-copy { margin-top: 10px; gap: 8px; }
.crs-copy .input { width: auto; }
.crs-dayhead { font-size: 13px; font-weight: 650; margin: 0 0 6px; color: var(--text-2); }
.crs-sess { margin-bottom: 14px; }
.crs-sess-h { display: flex; align-items: baseline; gap: 10px; padding: 4px 2px 6px; border-bottom: 2px solid #e2d8f6; margin-bottom: 4px; }
.crs-sess-h b { font-size: 14px; color: #4b2f8a; }
.crs-empty { padding: 8px 4px; }
.crs-table { table-layout: fixed; }
.crs-table td { vertical-align: middle; }
.crs-table td:last-child { width: 132px; }
.crs-code { width: 70px; font-weight: 750; color: var(--primary); white-space: nowrap; }
.crs-title { font-weight: 600; overflow-wrap: break-word; }
.crs-teach { width: 300px; }
.crs-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.crs-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 2px 1px 8px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 600; }
.crs-chip button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; line-height: 1; padding: 0 5px; border-radius: 99px; }
.crs-chip button:hover { background: rgba(0, 0, 0, 0.08); }
.crs-addt { width: auto; min-width: 130px; height: 28px; font-size: 12px; }
.crs-notec { width: 220px; }
.crs-notec .input { height: 28px; font-size: 12.5px; }
@media (max-width: 900px) { .crs-list { grid-template-columns: minmax(0, 1fr); } }
/* «Πρόγραμμα»: rows «Σεμινάρια – Πρωί / Απόγευμα» */
.crs-row th.crs-h { background: #f4f0fc; vertical-align: top; }
.crs-cell .pr-btn { gap: 2px; }
.crs-pr { display: block; font-size: 11px; line-height: 1.3; padding: 1px 5px; border-radius: 4px; background: #efe9fb; color: #4b2f8a; }
.crs-pr b { margin-right: 4px; }
.crs-pr span { font-weight: 500; opacity: 0.85; }
.crs-pr span.none { color: var(--danger); opacity: 1; }
.lv-courses { margin-top: 6px; }
.crs-more { display: block; font-size: 11px; font-weight: 650; color: var(--muted); padding: 1px 5px; }
.ab-just { color: var(--success); font-weight: 600; }
.ab-hours .just-chip { margin-left: 6px; }
/* the «ΩΡΑΡΙΟ» of each class in the Excel of the programme */
.cx-hours summary { cursor: pointer; }
.cx-hours-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin-top: 8px; max-height: 240px; overflow: auto; }
.cx-hrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.cx-hrow span { flex: 1; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-hrow .input { width: 120px; height: 28px; padding-top: 0; padding-bottom: 0; }

/* a training course (σεμινάριο) on a class's day — not an academy subject */
.crs-tag { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #7a4d00; background: #fff1d6; border: 1px solid #f1d39a; border-radius: 4px; padding: 0 4px; margin-left: 3px; vertical-align: 1px; line-height: 1.45; }
