/* V23.9.434 — High-contrast light journal states.
 * The V108 teacher-journal styling uses pale dark-theme ink (#bbf7d0,
 * #bfdbfe, #fde68a, #fecaca) over translucent chips. On light surfaces
 * these become nearly invisible. Loaded after both legacy and Aurora CSS.
 * No changes to dark-theme colors, geometry or journal behavior.
 */

/* Ordinary and inline marks (both the legacy and the Aurora preview shell). */
html[data-theme="light"] body .teacher-grade-journal .grade-chip.grade-5,
html[data-theme="light"] body .gradebook-dated .grade-chip.grade-5 {
  background:#dcfce7!important; border:1px solid #16a34a!important;
  color:#14532d!important; -webkit-text-fill-color:#14532d!important;
  text-shadow:none!important; opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-chip.grade-4,
html[data-theme="light"] body .gradebook-dated .grade-chip.grade-4 {
  background:#dbeafe!important; border:1px solid #3b82f6!important;
  color:#1e3a8a!important; -webkit-text-fill-color:#1e3a8a!important;
  text-shadow:none!important; opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-chip.grade-3,
html[data-theme="light"] body .gradebook-dated .grade-chip.grade-3 {
  background:#fef3c7!important; border:1px solid #d97706!important;
  color:#78350f!important; -webkit-text-fill-color:#78350f!important;
  text-shadow:none!important; opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-chip.grade-2,
html[data-theme="light"] body .gradebook-dated .grade-chip.grade-2 {
  background:#fee2e2!important; border:1px solid #ef4444!important;
  color:#991b1b!important; -webkit-text-fill-color:#991b1b!important;
  text-shadow:none!important; opacity:1!important;
}

/* Text typed into grade / attendance fields stays legible. */
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input,
html[data-theme="light"] body .teacher-grade-journal .journal-final-input {
  color:#1e293b!important; -webkit-text-fill-color:#1e293b!important;
  caret-color:#1e293b!important; text-shadow:none!important;
}
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input::placeholder,
html[data-theme="light"] body .teacher-grade-journal .journal-final-input::placeholder {
  color:#64748b!important; -webkit-text-fill-color:#64748b!important;
  opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-date-cell.attendance-absent .journal-mark-input,
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.attendance-absent {
  background:#fee2e2!important; border-color:#dc2626!important;
  color:#991b1b!important; -webkit-text-fill-color:#991b1b!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-date-cell.attendance-sick .journal-mark-input,
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.attendance-sick {
  background:#dbeafe!important; border-color:#2563eb!important;
  color:#1e3a8a!important; -webkit-text-fill-color:#1e3a8a!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-date-cell.attendance-excused .journal-mark-input,
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.attendance-excused {
  background:#fef3c7!important; border-color:#d97706!important;
  color:#78350f!important; -webkit-text-fill-color:#78350f!important;
}
html[data-theme="light"] body .teacher-grade-journal .grade-date-cell.attendance-work .journal-mark-input,
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.attendance-work {
  background:#f3e8ff!important; border-color:#9333ea!important;
  color:#581c87!important; -webkit-text-fill-color:#581c87!important;
}

/* Present is a pictogram rather than a letter; keep its dark-green tick.
 * Reveal normal text when the field receives focus / editing. */
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input[data-present-visual="1"]:not(:focus) {
  background:#dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19.5 6.8' fill='none' stroke='%23166534' stroke-width='3.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat!important;
  border-color:#15803d!important;
  color:transparent!important; -webkit-text-fill-color:transparent!important;
}
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input[data-present-visual="1"]:focus {
  background-image:none!important;
  color:#14532d!important; -webkit-text-fill-color:#14532d!important;
  caret-color:#14532d!important;
}

/* Semestral / final grade inputs are separate elements from the chips. */
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.grade-5 {background:#dcfce7!important;color:#14532d!important;-webkit-text-fill-color:#14532d!important}
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.grade-4 {background:#dbeafe!important;color:#1e3a8a!important;-webkit-text-fill-color:#1e3a8a!important}
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.grade-3 {background:#fef3c7!important;color:#78350f!important;-webkit-text-fill-color:#78350f!important}
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.grade-2 {background:#fee2e2!important;color:#991b1b!important;-webkit-text-fill-color:#991b1b!important}

/* Coursework/task completion: on the screenshot "Не вып." is very faint. */
html[data-theme="light"] body .teacher-grade-journal .completion-chip.completion-completed,
html[data-theme="light"] body .gradebook-dated .completion-chip.completion-completed {
  background:#dcfce7!important;border-color:#16a34a!important;
  color:#14532d!important;-webkit-text-fill-color:#14532d!important;opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .completion-chip.completion-not_completed,
html[data-theme="light"] body .gradebook-dated .completion-chip.completion-not_completed {
  background:#fee2e2!important;border-color:#dc2626!important;
  color:#991b1b!important;-webkit-text-fill-color:#991b1b!important;opacity:1!important;
}

/* Non-editable attendance indicators, confirmation, and error states. */
html[data-theme="light"] body .teacher-grade-journal .attendance-chip.attendance-present {color:#14532d!important;-webkit-text-fill-color:#14532d!important}
html[data-theme="light"] body .teacher-grade-journal .attendance-chip.attendance-absent {color:#991b1b!important;-webkit-text-fill-color:#991b1b!important}
html[data-theme="light"] body .teacher-grade-journal .attendance-chip.attendance-sick {color:#1e3a8a!important;-webkit-text-fill-color:#1e3a8a!important}
html[data-theme="light"] body .teacher-grade-journal .attendance-chip.attendance-excused {color:#78350f!important;-webkit-text-fill-color:#78350f!important}
html[data-theme="light"] body .teacher-grade-journal .attendance-chip.attendance-work {color:#581c87!important;-webkit-text-fill-color:#581c87!important}
html[data-theme="light"] body .teacher-grade-journal .attendance-confirmed-mark {color:#475569!important;-webkit-text-fill-color:#475569!important;opacity:1!important}
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.is-error,
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.is-error {
  border:2px solid #b91c1c!important;
  box-shadow:0 0 0 2px rgba(185,28,28,.16)!important;
  opacity:1!important;
}
html[data-theme="light"] body .teacher-grade-journal .journal-mark-input.is-saving,
html[data-theme="light"] body .teacher-grade-journal .journal-final-input.is-saving {opacity:.80!important}

/* V23.9.487 — persisted leader/curator attendance marks keep their visual weight.
 * A freshly saved mark has an attendance-* class on the input (JS), while the
 * V486 server rendered previous marks with the class only on the parent TD.
 * Match both shapes. Light theme only; do not affect dates, rights or dark UI.
 */
html[data-theme="light"] body .leader-attendance-grid .leader-attendance-day-cell.attendance-absent .leader-mark-input,
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input.attendance-absent {
  background:#fee2e2!important; border-color:#dc2626!important;
  color:#991b1b!important; -webkit-text-fill-color:#991b1b!important;
  opacity:1!important; filter:none!important; text-shadow:none!important;
}
html[data-theme="light"] body .leader-attendance-grid .leader-attendance-day-cell.attendance-sick .leader-mark-input,
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input.attendance-sick {
  background:#dbeafe!important; border-color:#2563eb!important;
  color:#1e3a8a!important; -webkit-text-fill-color:#1e3a8a!important;
  opacity:1!important; filter:none!important; text-shadow:none!important;
}
html[data-theme="light"] body .leader-attendance-grid .leader-attendance-day-cell.attendance-excused .leader-mark-input,
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input.attendance-excused {
  background:#fef3c7!important; border-color:#d97706!important;
  color:#92400e!important; -webkit-text-fill-color:#92400e!important;
  opacity:1!important; filter:none!important; text-shadow:none!important;
}
html[data-theme="light"] body .leader-attendance-grid .leader-attendance-day-cell.attendance-work .leader-mark-input,
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input.attendance-work {
  background:#f3e8ff!important; border-color:#9333ea!important;
  color:#581c87!important; -webkit-text-fill-color:#581c87!important;
  opacity:1!important; filter:none!important; text-shadow:none!important;
}
/* Keep the check mark for present; the input's value is intentionally blank. */
html[data-theme="light"] body .leader-attendance-grid .leader-attendance-day-cell.attendance-present .leader-mark-input[data-present-visual="1"],
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input.attendance-present[data-present-visual="1"] {
  background:#dcfce7 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.2 4.2L19.5 6.8' fill='none' stroke='%23166534' stroke-width='3.35' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px 22px no-repeat!important;
  border-color:#15803d!important;
  color:transparent!important; -webkit-text-fill-color:transparent!important;
  opacity:1!important; filter:none!important;
}
html[data-theme="light"] body .leader-attendance-grid .leader-mark-input[data-present-visual="1"]:focus {
  background-image:none!important;
  color:#14532d!important; -webkit-text-fill-color:#14532d!important;
  caret-color:#14532d!important;
}
