/* Student portal additions to the Command Center design system (css/admin.css). Colours come from its variables,
   so light and dark mode both work. Scripts and styles stay in files (strict CSP). */

.cc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.st-h { margin: 26px 0 12px; font-size: 18px; }
.st-sub { margin: 22px 0 8px; font-size: 15px; }
.st-alert { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.st-alert .cc-btn { margin-left: auto; }

.st-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px 24px; text-align: center; }
.st-empty > i { font-size: 34px; color: var(--cc-primary); }
.st-empty h1, .st-empty h2 { margin: 6px 0 0; }
.st-empty p { max-width: 460px; margin: 0 0 8px; color: var(--cc-body); }

/* Cards of courses / certificates */
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 22px; }
.st-card { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.st-card h2, .st-card h3 { margin: 0; font-size: 17px; line-height: 1.3; }
.st-card h2 a, .st-card h3 a { text-decoration: none; }
.st-card p { margin: 0; }
.st-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 10px; }
.st-tag { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cc-primary); }
.st-price { font-size: 17px; font-weight: 700; color: var(--cc-ink); }
.st-price--lg { margin: 0 0 8px; font-size: 28px; }
.st-url { word-break: break-all; }
.st-progress { margin-bottom: 18px; }

.st-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.st-filters .cc-search { flex: 1 1 240px; }

/* Lists with a leading date / icon */
.st-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.st-list > li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--cc-border); }
.st-list > li:first-child { border-top: 0; }
.st-list > li > span:not(.st-date):not(.st-ico) { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.st-list > li > span.cc-badge:not(.st-date):not(.st-ico) { flex: 0 0 auto; align-self: center; }
.st-list--tight > li { padding: 9px 0; align-items: flex-start; }
.st-date { display: inline-flex; flex-direction: column; align-items: center; flex: 0 0 48px; padding: 6px 0; line-height: 1.1; color: var(--cc-primary); background: var(--cc-primary-soft); border-radius: 12px; }
.st-date strong { font-size: 18px; } .st-date small { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.st-ico { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px; height: 38px; color: var(--cc-primary); background: var(--cc-primary-soft); border-radius: 12px; }
.st-ico--due { color: #B54708; background: rgba(247, 144, 9, .14); }
.st-score { flex: 0 0 auto; white-space: nowrap; }
.st-note { padding: 10px 0; border-top: 1px solid var(--cc-border); }
.st-note:first-of-type { border-top: 0; }
.st-note strong, .st-note span { display: block; }
.st-note p { margin: 6px 0 0; font-size: 14px; }
.st-plain { margin: 0; padding: 0; list-style: none; }
.st-plain li { padding: 5px 0; overflow-wrap: anywhere; }
.st-plain li i { width: 18px; margin-right: 4px; color: var(--cc-primary); }
.st-trainer { display: flex; gap: 14px; padding: 10px 0; }
.st-trainer .cc-avatar { flex: 0 0 38px; }

/* Rich text */
.st-prose { line-height: 1.7; overflow-wrap: anywhere; }
.st-prose > :first-child { margin-top: 0; } .st-prose > :last-child { margin-bottom: 0; }
.st-prose img { max-width: 100%; height: auto; }
.st-exercise { padding: 14px 16px; background: var(--cc-soft); border-left: 4px solid var(--cc-primary); border-radius: 10px; }
.cc-code { max-width: 100%; margin: 14px 0; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; color: #E5E7F5; background: #17162B; border-radius: 12px; }

/* Curriculum and the learning page */
.st-mod { margin: 0 0 8px; }
.st-lessons { margin: 6px 0 4px; padding: 0; list-style: none; }
.st-lessons li { display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 10px; overflow-wrap: anywhere; }
.st-lessons li i { flex: 0 0 18px; color: var(--cc-primary); }
.st-lessons li.is-done i { color: #12B76A; }
.st-lessons li.is-locked { color: var(--cc-muted, #8A8CA5); }
.st-lessons li.is-locked i { color: var(--cc-muted, #8A8CA5); }
.st-lessons li.is-current { background: var(--cc-primary-soft); font-weight: 600; }
.st-learn { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: 22px; }
.st-side { position: sticky; top: 92px; margin: 0; max-height: calc(100vh - 110px); overflow-y: auto; }
.st-side summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.st-side summary::-webkit-details-marker { display: none; }
.st-side__mod { margin: 14px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cc-muted, #8A8CA5); }
.st-lesson { margin: 0; min-width: 0; }
.st-lesson h1 { margin: 0 0 16px; font-size: 26px; line-height: 1.25; }
.st-video { position: relative; width: 100%; margin: 0 0 20px; padding-top: 56.25%; overflow: hidden; background: #000; border-radius: 14px; }
.st-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.st-lesson__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--cc-border); }
.st-lesson__nav form { margin: 0; }

/* Messages, feedback, answers */
.st-msg { max-width: 640px; margin: 0 0 12px; padding: 12px 14px; background: var(--cc-soft); border-radius: 14px; }
.st-msg--student { margin-left: auto; background: var(--cc-primary-soft); }
.st-msg p { margin: 6px 0 0; overflow-wrap: anywhere; }
.st-feedback { padding: 12px 14px; background: var(--cc-primary-soft); border-radius: 12px; }
.st-feedback p { margin: 4px 0 0; }
.st-answer { padding: 10px 12px; background: var(--cc-soft); border-radius: 10px; overflow-wrap: anywhere; }
.st-sub-row { padding: 14px 0; border-top: 1px solid var(--cc-border); }
.st-sub-row:first-of-type { border-top: 0; }
.st-inline { display: flex; flex-wrap: wrap; gap: 8px; }

/* Quiz */
.st-q { margin: 0 0 16px; border: 0; }
.st-q legend, .st-q h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 0; font-size: 15px; }
.st-q__n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; font-weight: 700; color: #fff; background: var(--cc-primary); border-radius: 50%; }
.st-q__text { margin: 0 0 12px; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.st-opt { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 8px; padding: 12px 14px; cursor: pointer; border: 1px solid var(--cc-border); border-radius: 12px; }
.st-opt:hover { border-color: var(--cc-primary); }
.st-opt input { margin-top: 3px; }
.st-opt:has(input:checked) { background: var(--cc-primary-soft); border-color: var(--cc-primary); }
.st-quiz__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: flex-end; margin: 0; }
.st-quiz__bar .cc-muted { margin-right: auto; }
.st-timer { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cc-primary); background: var(--cc-primary-soft); border-radius: 14px; }
.st-timer.is-low { color: #B42318; background: rgba(240, 68, 56, .12); }
.is-right { color: #067647; font-weight: 600; } .is-wrong { color: #B42318; }

/* Timetable, notifications */
.st-day.is-today { box-shadow: 0 0 0 2px var(--cc-primary), var(--cc-shadow); }
.st-day h2 { margin: 0 0 6px; font-size: 16px; }
.st-notes { margin: 0; padding: 0; list-style: none; }
.st-notes li { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--cc-border); }
.st-notes li:first-child { border-top: 0; }
.st-notes li > i { flex: 0 0 22px; color: var(--cc-primary); }
.st-notes li > a { flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--cc-ink); }
.st-notes li > a span { display: block; margin-top: 2px; font-weight: 400; color: var(--cc-body); }
.st-notes li.is-unread { background: var(--cc-primary-soft); }
.st-notes time { flex: 0 0 auto; white-space: nowrap; }
.cc-stbell { position: relative; text-decoration: none; }

@media (max-width: 960px) {
  .st-learn { grid-template-columns: 1fr; }
  .st-side { position: static; max-height: none; }
  .st-side:not([open]) .cc-progress { display: none; }
}
@media (max-width: 600px) {
  .st-cards { grid-template-columns: 1fr; }
  .st-lesson h1 { font-size: 22px; }
  .st-list > li { flex-wrap: wrap; }
  .st-alert .cc-btn { margin-left: 0; }
  .st-notes li { flex-wrap: wrap; padding: 12px 16px; }
  .st-lesson__nav > * { flex: 1 1 100%; justify-content: center; }
}


/* Course cards: picture on top, then category, title, summary, facts, teacher, price + action */
.st-card--pic { position: relative; padding: 0; gap: 0; overflow: hidden; transition: box-shadow .18s ease, transform .18s ease; }
.st-card--pic:hover { box-shadow: 0 10px 28px rgba(40, 30, 110, .14); transform: translateY(-2px); }
.st-card--pic:focus-within { box-shadow: 0 0 0 3px var(--cc-primary, #4D44C5); }
.st-frame { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--cc-accent-soft, #ECE8FD); }
.st-frame__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) saturate(1.1); transform: scale(1.15); opacity: .85; }
.st-pic { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
.st-frame--none { display: grid; place-items: center; font-size: 38px; color: var(--cc-accent, #4E2FDA); background: linear-gradient(135deg, var(--cc-accent-soft, #ECE8FD), rgba(78, 47, 218, .22)); }
.st-card__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 16px 18px 18px; }
.st-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.st-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; color: var(--cc-primary, #4D44C5); background: var(--cc-accent-soft, #ECE8FD); }
.st-card--pic h2 { font-size: 18px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-card--pic h2 a { color: inherit; }
.st-card--pic h2 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }   /* the whole card opens the course */
.st-card__sum { font-size: 14px; line-height: 1.5; color: var(--cc-muted, #5b6075); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--cc-muted, #5b6075); }
.st-meta i { margin-right: 5px; color: var(--cc-primary, #4D44C5); }
.st-teacher { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cc-muted, #5b6075); }
.st-avatar { display: inline-grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #fff; background: var(--cc-primary, #4D44C5); }
.st-card--pic .st-card__foot { position: relative; z-index: 1; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--cc-line, rgba(120, 120, 150, .22)); }
.st-card--pic .cc-progress, .st-card--pic .st-progress { margin: 2px 0; }
.st-hero { display: block; width: 100%; height: auto; max-height: 460px; object-fit: contain; border-radius: 18px; margin: 4px 0 16px; background: transparent; }
.st-hero--none { display: none; }
@media (prefers-reduced-motion: reduce) { .st-card--pic { transition: none; } .st-card--pic:hover { transform: none; } }

/* free places */
.st-was { font-weight: 500; font-size: .8em; opacity: .6; margin-left: 4px; }
.st-free { align-items: flex-start; }
.st-free > i { margin-top: 3px; }
.st-free > div { flex: 1 1 260px; min-width: 0; }
