/* 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;
}

/* V435 — unified, readable notification bell for all roles/preview states. */
.navbar #ucp-bell-open{
  box-sizing:border-box!important;display:grid!important;place-items:center!important;
  border:1px solid rgba(148,163,184,.28)!important;border-radius:12px!important;
  background:rgba(250,250,249,.97)!important;color:#273449!important;
  box-shadow:0 2px 8px rgba(15,23,42,.07)!important;
  font-family:system-ui,sans-serif!important;font-size:20px!important;
  text-shadow:none!important;opacity:1!important;cursor:pointer!important;
  width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;
  padding:0!important;line-height:1!important;
}
.navbar #ucp-bell-open .ucp-unified-bell-icon{display:grid!important;place-items:center!important;font-size:20px!important;line-height:1!important;filter:none!important;transform:none!important;}
.navbar #ucp-bell-open i[hidden]{display:none!important}
html:not([data-theme="light"]) .navbar #ucp-bell-open{
  background:rgba(28,35,53,.96)!important;color:#f7e5c7!important;
  border-color:rgba(148,163,184,.38)!important;
}
.navbar #ucp-bell-open:focus-visible{outline:3px solid #ed8a2d!important;outline-offset:2px!important}
/* Shared avatar aperture calibration from full-resolution transparent frame alpha.
   Decorative spikes belong to the TOP image layer; the photo fills the hole below. */
[data-avatar-frame]{--avatar-core-ratio:66%}
[data-avatar-frame="blood"]{--avatar-core-ratio:69%}
[data-avatar-frame="cosmos"]{--avatar-core-ratio:62%}
[data-avatar-frame="ghost"]{--avatar-core-ratio:67%}
[data-avatar-frame="gold"]{--avatar-core-ratio:65%}
[data-avatar-frame="halloween"][data-avatar-frame-variant="basic"]{--avatar-core-ratio:74%}
[data-avatar-frame="halloween"][data-avatar-frame-variant="special"]{--avatar-core-ratio:61%}
[data-avatar-frame="developer"][data-avatar-frame-variant="red"]{--avatar-core-ratio:65%}
[data-avatar-frame="developer"][data-avatar-frame-variant="blue"]{--avatar-core-ratio:53%}
/* Unframed avatars preserve their normal geometry. */
/* Apply one ratio to navigation, profile, frame picker and store; preserve shell dimensions. */
.navbar .nav-account-avatar-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .avatar-frame-core,
.avatar-frame-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .avatar-frame-core{
  width:var(--avatar-core-ratio)!important;height:var(--avatar-core-ratio)!important;
  aspect-ratio:1!important;max-width:none!important;max-height:none!important;
  overflow:hidden!important;border-radius:50%!important;flex-shrink:0!important;
}
.oct15-avatar-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .oct15-avatar-core{
  width:var(--avatar-core-ratio)!important;height:var(--avatar-core-ratio)!important;
  border-radius:50%!important;overflow:hidden!important;
}
/* Legacy hero has a fixed inset: synchronize it with the same aperture token. */
body[data-oct30-preview="1"] :is(.profile-hero,.parent-profile-hero) .oct15-avatar-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .oct15-avatar-core{
  inset:calc((100% - var(--avatar-core-ratio))/2)!important;width:auto!important;height:auto!important;
}
[data-avatar-frame] > :is(.avatar-frame-core,.oct15-avatar-core) img,
[data-avatar-frame] > :is(.avatar-frame-core,.oct15-avatar-core) .oct15-avatar-photo{
  display:block!important;width:100%!important;height:100%!important;
  object-fit:cover!important;object-position:center!important;border-radius:50%!important;
}
/* Decorative overlays remain at full size and always above photos. */
[data-avatar-frame] > :is(.avatar-frame-layer,.oct15-frame-overlay){z-index:4!important;pointer-events:none!important}

/* Aurora 30-Oct frame editor and developer profile also use aperture tokens. */
body[data-oct30-preview="1"] .ui-avatar-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .ui-avatar-core{
  position:absolute!important;
  inset:calc((100% - var(--avatar-core-ratio))/2)!important;
  width:auto!important;height:auto!important;
  border-radius:50%!important;overflow:hidden!important;
}
body[data-oct30-preview="1"] .ui-avatar-shell[data-avatar-frame]:not([data-avatar-frame="none"]) > .ui-avatar-core > img{
  position:static!important;width:100%!important;height:100%!important;
  max-width:none!important;object-fit:cover!important;transform:none!important;
}

/* V490: sable avatar frame video is a non-interactive transparent overlay. */
[data-avatar-frame="sable_winter"]{--avatar-core-ratio:52%!important}
[data-avatar-frame="sable_winter"] video.sable-frame-video{
  position:absolute!important;left:50%!important;top:50%!important;
  width:100%!important;height:100%!important;max-width:none!important;
  transform:translate(-50%,-50%)!important;object-fit:contain!important;
  pointer-events:none!important;border:0!important;border-radius:0!important;
  z-index:5!important;background:transparent!important;
}
[data-avatar-frame="sable_winter"] .sable-frame-video[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){
  [data-avatar-frame="sable_winter"] video.sable-frame-video{display:none!important}
}

