/* JAMM School — прототип дашборду. Кольори взяті з реального CSS платформи. */
:root {
  --green-brand: #46b06f;
  /* лого / кнопки */
  --green-300: rgb(96 211 148);
  /* виконано / цільова стрілка */
  --yellow-300: rgb(254 225 165);
  /* прогрес-смуга */
  --yellow-600: rgb(255 217 125);
  /* поточна стрілка */
  --red-300: rgb(255 108 108);
  /* дедлайн / практична */
  --grey-300: rgb(245 245 243);
  --grey-400: rgb(238 238 238);
  --grey-500: rgb(210 210 210);
  --grey-800: rgb(91 91 91);
  --blue-700: rgb(67 142 155);
  --blue-300: rgb(140 193 218);
  /* кнопка "Попередня сторінка" */
  --text: #1f2937;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--grey-400);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 44px;
}

.superpowers-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.superpowers-btn img {
  height: 22px;
  margin-bottom: 2px;
}

.superpowers-btn b {
  color: var(--yellow-600);
}

.superpowers {
  display: flex;
  gap: 36px;
  flex: 1;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: .3px;
}

.superpowers .pct {
  color: var(--yellow-600);
  font-weight: 700;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #6b7280;
  font-size: 18px;
}

.class-select {
  padding: 5px 8px;
  border: 1px solid var(--grey-500);
  border-radius: 6px;
  font-size: 14px;
}

.admin-link {
  color: var(--blue-700);
  text-decoration: none;
  font-size: 20px;
}

/* ---------- Layout ---------- */
.wrap {
  display: flex;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.main {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 280px;
  flex: none;
}

.btn-success {
  background: var(--green-brand);
  color: #fff;
  border: 0;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
}

/* ---------- Course row (lokomotive-line) ---------- */
.course {
  margin-bottom: 36px;
}

.lokomotive-line {
  display: flex;
  align-items: stretch;
}

.collapse-button {
  width: 35px;
  min-height: 45px;
  border: 0;
  background: var(--grey-400);
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
  cursor: pointer;
  position: relative;
}

.collapse-button::before,
.collapse-button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--blue-700);
  transform: translate(-50%, -50%);
}

.collapse-button::before {
  width: 20px;
  height: 2px;
}

.collapse-button::after {
  width: 2px;
  height: 20px;
}

.course.open .collapse-button::after {
  display: none;
}

.coursename-wrapper {
  flex: 1;
  display: flex;
  position: relative;
  min-width: 0;
}

.coursename-bar {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--grey-300);
  overflow: hidden;
  display: flex;
  align-items: center;
  /* гострий правий край — форма з docs/screenshots/grey_progress_line.svg */
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 0 100%);
}

.progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  height: 100%;
  background: var(--yellow-300);
}

.coursename {
  position: relative;
  z-index: 2;
  padding: 11px 16px;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* deadline flag */
.flag {
  position: absolute;
  top: -2px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flag-board {
  background: var(--red-300);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 4px 7px;
  border-radius: 4px;
}

.flag-pole {
  width: 2px;
  height: 14px;
  background: var(--blue-700);
}

/* current / target arrows — форма з docs/screenshots/{yellow,green}.svg (76×51):
   шеврон із гострим вістрям праворуч і виїмкою-хвостом ліворуч. */
.arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  color: #000;
  font-weight: 700;
  font-size: 16px;
  clip-path: polygon(1.8% 0, 66.3% 0, 100% 50%, 66.3% 100%, 0 100%, 33.8% 50%);
  margin-left: 4px;
}

.arrow.current {
  background: var(--yellow-600);
}

.arrow.target {
  background: var(--green-300);
}

/* ---------- Vagons (tasks) ---------- */
.vagons {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  /* Праве поле = ширина двох стрілок (поточна+ціль): рядок рівняється по
     правому краю смуги курсу, а не виходить під стрілки. */
  padding: 6px 120px 0 39px;
}

.vagon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  background: var(--green-300);
  color: #000;
  font-weight: 700;
  font-size: 16px;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  cursor: pointer;
  transition: transform .08s;
}

.vagon:hover {
  transform: translateY(2px);
}

.vagon.empty {
  background: var(--grey-400);
  color: transparent;
}

.vagon.locked {
  background: var(--grey-300);
  color: var(--grey-500);
  cursor: not-allowed;
}

.vagon.locked:hover {
  transform: none;
}

.vagon.test {
  height: 45px;
  border: 2px solid var(--green-300);
}

.vagon.test:not(.empty) {
  border-color: #2fae73;
}

.vagon.practical {
  height: 45px;
  border: 2px solid var(--red-300);
}

/* ---------- Link rows ---------- */
.linkrow {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--grey-300);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--grey-800);
}

.linkrow .ic {
  color: var(--blue-700);
}

/* ---------- Sidebar widgets ---------- */
.widget {
  margin-bottom: 22px;
}

.widget-title {
  background: var(--yellow-600);
  color: #000;
  font-weight: 700;
  text-align: center;
  padding: 7px;
  border-radius: 6px 6px 0 0;
}

.widget-body {
  background: var(--grey-300);
  padding: 16px;
  border-radius: 0 0 6px 6px;
}

.goals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 40px;
  font-weight: 700;
}

.goals .cur {
  color: #000;
}

.goals .slash {
  color: #9ca3af;
}

.goals .tgt {
  color: var(--green-300);
}

.cal {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 13px;
}

.cal th {
  color: #6b7280;
  padding: 4px 0;
}

.cal td {
  padding: 5px 0;
  color: #374151;
}

.cal td.muted {
  color: #cbd5e1;
}

.cal td.today {
  background: var(--yellow-600);
  border-radius: 4px;
  font-weight: 700;
}

/* ---------- Task page ---------- */
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--blue-700);
  font-weight: 600;
}

.show-disclaimer-btn {
  margin: 0 0 16px 14px;
  font-size: 14px;
}

/* Модальне вікно (дисклеймер курсу) */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 20px;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}

.modal-greeting {
  margin: 0 0 16px;
  color: var(--green-brand);
  font-size: 22px;
}

.disclaimer-points {
  margin: 0 0 24px;
  padding-left: 22px;
  line-height: 1.6;
}

.disclaimer-points li {
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.modal-actions .btn-success {
  margin-bottom: 0;
}

.course-strip {
  background: var(--grey-300);
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 18px;
}

.task-title {
  color: var(--blue-700);
  font-size: 22px;
  margin: 0 0 18px;
}

.task-card {
  background: var(--grey-300);
  border-radius: 10px;
  padding: 24px;
}

.task-meta {
  text-align: center;
  color: #4b5563;
  margin: 4px 0;
}

.qtext {
  font-size: 20px;
  margin: 0 0 18px;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  cursor: pointer;
}

.anum {
  color: #6b7280;
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.btn-clear {
  background: none;
  border: 0;
  color: #6b7280;
  cursor: pointer;
  text-decoration: underline;
}

.btn-arrow {
  background: var(--yellow-600);
  color: #000;
  border: 0;
  cursor: pointer;
  padding: 12px 28px;
  font-size: 16px;
  font-weight: 700;
  clip-path: polygon(0 0, 90% 0, 100% 50%, 90% 100%, 0 100%);
}

.btn-arrow.prev {
  background: var(--blue-300);
  clip-path: polygon(10% 0, 100% 0, 100% 100%, 10% 100%, 0 50%);
}

.result {
  font-weight: 700;
  margin-top: 14px;
  min-height: 22px;
}

.result.ok {
  color: #2fae73;
}

.result.bad {
  color: #e23b3b;
}

/* ---------- Звіт після завдання ---------- */
.report-summary {
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14px;
  border: 1px solid var(--grey-500);
}

.report-summary th,
.report-summary td {
  border: 1px solid var(--grey-500);
  padding: 6px 12px;
  text-align: left;
}

.report-summary th {
  background: var(--grey-300);
  color: var(--grey-800);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.report-q {
  position: relative;
  background: #fff;
  border: 1px solid var(--grey-400);
  border-radius: 8px;
  padding: 20px 24px;
}

.report-q .qtext {
  margin: 0 0 16px;
}

.report-q .answers {
  gap: 10px;
}

.report-q .answer {
  cursor: default;
}

.report-mark {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
}

.report-q.ok .report-mark {
  color: #2fae73;
}

.report-q.bad .report-mark {
  color: #e23b3b;
}

.report-verdict {
  background: var(--yellow-300);
  color: var(--grey-800);
  padding: 12px 24px;
  margin: 0 0 24px;
  font-weight: 600;
}

/* ---------- Питання-відповідність ---------- */
.match-table {
  border-collapse: collapse;
  margin: 4px 0;
}

.match-table td {
  padding: 6px 10px 6px 0;
  vertical-align: middle;
  font-size: 18px;
}

.match-table .match-left {
  font-weight: 600;
  white-space: nowrap;
}

.match-table .match-right select {
  font-size: 15px;
  padding: 6px 8px;
  border: 1px solid var(--grey-500);
  border-radius: 6px;
  background: #fff;
  min-width: 220px;
}

.match-table.report .match-right {
  color: var(--grey-800);
}

.match-table.report .match-mk {
  font-weight: 700;
  padding-left: 8px;
}

.match-table.report tr.ok .match-mk {
  color: #2fae73;
}

.match-table.report tr.bad .match-mk {
  color: #e23b3b;
}

.report-q.partial .report-mark {
  color: #e0a100;
}

/* ---------- Admin ---------- */
.admin-h {
  font-size: 18px;
  margin: 0;
  flex: 1;
  color: var(--text);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--grey-300);
  border-bottom: 1px solid var(--grey-400);
  position: sticky;
  top: 65px;
  z-index: 40;
  flex-wrap: wrap;
}

.admin-toolbar .spacer {
  flex: 1;
}

.save-status {
  color: #2fae73;
  font-size: 13px;
  font-weight: 600;
  min-width: 80px;
}

.ad-btn {
  background: var(--green-brand);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

.ad-btn.small {
  padding: 4px 8px;
  font-size: 13px;
}

.ad-btn.danger {
  background: var(--red-300);
}

.ad-btn.file-btn {
  display: inline-flex;
  align-items: center;
}

.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.ad-course {
  border: 1px solid var(--grey-400);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 24px;
}

.ad-course-head {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.ad-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #6b7280;
}

.ad-field.grow,
.ad-course-head .grow {
  flex: 1;
}

.ad-field.w-80 {
  width: 80px;
}

.ad-field.w-100 {
  width: 110px;
}

.ad-label {
  font-weight: 600;
}

.ad-field input,
.ad-tasks input,
.ad-tasks select,
.q-editor input {
  padding: 6px 8px;
  border: 1px solid var(--grey-500);
  border-radius: 5px;
  font-size: 14px;
  width: 100%;
}

.ad-tasks {
  width: 100%;
  border-collapse: collapse;
}

.ad-tasks th {
  text-align: left;
  font-size: 12px;
  color: #6b7280;
  padding: 6px;
  border-bottom: 2px solid var(--grey-400);
}

.ad-tasks td {
  padding: 5px 6px;
  vertical-align: middle;
}

.ad-tasks .w-50 {
  width: 46px;
}

.ad-tasks .w-60 {
  width: 60px;
}

.ad-tasks tr.locked-row {
  background: #fafafa;
  color: #9ca3af;
}

.lock-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  white-space: nowrap;
}

.lock-toggle input {
  width: auto;
}

.q-row .q-editor {
  background: #f8fafc;
  border: 1px dashed var(--grey-500);
  border-radius: 8px;
  padding: 14px;
  margin: 4px 0 10px;
}

.q-meta {
  display: flex;
  gap: 12px;
  margin: 10px 0;
}

.q-hint {
  font-size: 13px;
  color: #6b7280;
  margin: 8px 0 4px;
}

.q-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.q-opt {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-opt input[type=radio] {
  width: auto;
}

.q-opt .anum {
  color: #6b7280;
  min-width: 18px;
}

/* Список курсів (головна адмінки) */
.muted-note {
  color: #6b7280;
}

.course-card {
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--grey-400);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fff;
}

.cc-info {
  flex: 1;
  min-width: 0;
}

.cc-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.cc-meta {
  color: #6b7280;
  font-size: 14px;
}

.cc-actions {
  display: flex;
  gap: 8px;
  flex: none;
}

.cc-actions .ad-btn {
  text-decoration: none;
}

/* Сторінка курсу */
.course-head {
  border: 1px solid var(--grey-400);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.ch-class {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 10px;
}

.ad-field.w-120 {
  width: 120px;
}

.ad-topic {
  border: 1px solid var(--grey-400);
  border-left: 4px solid var(--green-brand);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 18px;
}

.topic-head {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.topic-badge {
  background: var(--green-brand);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
  align-self: center;
}

.add-topic {
  display: block;
  margin: 4px 0 40px;
}

/* Сторінка завдання: одне питання на сторінці */
.qprogress {
  color: #6b7280;
  font-size: 13px;
  margin: 0 0 10px;
}

/* Адмінка: блок одного питання в списку */
.q-one {
  border: 1px solid var(--grey-400);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.q-one-head {
  font-weight: 700;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* ---------- Панель інструментів завдання ---------- */
.tools-panel {
  width: 220px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tools-title {
  font-weight: 700;
  color: var(--grey-800);
  font-size: 14px;
  margin-bottom: 2px;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--grey-400);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
}

.tool-btn:hover {
  border-color: var(--green-brand);
}

.tool-btn .tool-ic {
  font-size: 20px;
  line-height: 1;
}

.tool-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
}

.tool-btn.disabled:hover {
  border-color: var(--grey-400);
}

/* ---------- Модалка інструментів (поверх спільної .modal) ---------- */
.tool-modal {
  position: relative;
  max-width: 640px;
}

.tool-modal.wide {
  max-width: 900px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--grey-300);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--grey-800);
}

.modal-close:hover {
  background: var(--grey-400);
}

.modal-title {
  margin: 0 36px 16px 0;
  color: var(--blue-700);
  font-size: 20px;
}

.tool-frame {
  width: 100%;
  height: 420px;
  border: 1px solid var(--grey-400);
  border-radius: 8px;
}

.tool-frame.tall {
  height: 70vh;
}

/* Мультимедіа */
.media-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.media-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.media-frame-wrap {
  position: relative;
  padding-top: 56.25%;
}

.media-frame-wrap .tool-frame {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* Вебінари */
.webinar-join {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 16px;
}

.webinar-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
  font-size: 14px;
}

.webinar-table th,
.webinar-table td {
  border-bottom: 1px solid var(--grey-400);
  padding: 8px 10px;
  text-align: left;
}

.webinar-table th {
  color: #6b7280;
  font-weight: 600;
}

.webinar-table .wl {
  color: var(--blue-700);
  text-decoration: none;
  font-weight: 600;
}

.webinar-archive-toggle {
  display: inline-block;
  margin-bottom: 12px;
}

/* Бронювання зустрічі */
.booking-hint {
  color: #6b7280;
  font-size: 14px;
  margin: 0 0 12px;
}

.booking-month {
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.booking-cal {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

.booking-cal th {
  color: #6b7280;
  font-size: 12px;
  padding: 6px 0;
}

.booking-cal td {
  padding: 8px 0;
  border-radius: 8px;
}

.booking-cal td.avail {
  background: var(--green-300);
  color: #04331c;
  font-weight: 700;
  cursor: pointer;
}

.booking-cal td.avail:hover {
  background: var(--green-brand);
  color: #fff;
}

.booking-cal td.avail.picked {
  background: var(--green-brand);
  color: #fff;
  outline: 2px solid var(--blue-700);
}

.booking-toast {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--grey-300);
  border-radius: 8px;
  font-size: 14px;
}

/* Чат з учителем — статичний макет */
.chat-mock {
  display: flex;
  gap: 0;
  border: 1px solid var(--grey-400);
  border-radius: 10px;
  overflow: hidden;
  height: 60vh;
}

.chat-side {
  width: 220px;
  flex: none;
  border-right: 1px solid var(--grey-400);
  padding: 12px;
  background: var(--grey-300);
  overflow: auto;
}

.chat-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--grey-500);
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}

.chat-section {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.chat-contact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  font-size: 14px;
}

.chat-contact.active {
  background: #fff;
}

.chat-contact .chat-sub {
  font-size: 12px;
  color: #6b7280;
}

.chat-ava {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-300);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.chat-thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow: auto;
}

.chat-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-msg.out {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: 70%;
  background: var(--grey-300);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg.out .chat-bubble {
  background: var(--blue-300);
}

.chat-bubble .sk {
  display: block;
  height: 10px;
  border-radius: 5px;
  background: var(--grey-500);
  opacity: .6;
}

.chat-input {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.chat-input input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--grey-500);
  border-radius: 8px;
  font-size: 14px;
}

.chat-input .btn-success {
  margin-bottom: 0;
  padding: 9px 16px;
}

/* ---------- Віджет «Джари» (гейміфікація) ---------- */
.jars-widget {
  text-align: center;
}

.jars-banner {
  background: var(--yellow-600);
  color: #000;
  font-weight: 800;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  letter-spacing: .3px;
}

.jars-hint {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 14px;
  line-height: 1.4;
}

.jar {
  position: relative;
  width: 92px;
  height: 112px;
  margin: 0 auto 10px;
  border: 3px solid var(--grey-500);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.jar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 7px;
  background: var(--grey-500);
  border-radius: 0 0 4px 4px;
  z-index: 2;
}

.jar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(var(--yellow-300), var(--yellow-600));
  transition: height .4s ease;
}

.jar-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  z-index: 1;
}

.jars-level {
  font-weight: 700;
  margin-bottom: 2px;
}

.jars-total {
  color: var(--grey-800);
  margin-bottom: 12px;
}

.jars-total b {
  color: var(--yellow-600);
  font-size: 18px;
}

.jars-progress {
  height: 10px;
  background: var(--grey-300);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.jars-progress span {
  display: block;
  height: 100%;
  background: var(--green-brand);
  transition: width .4s ease;
}

.jars-next {
  font-size: 13px;
  color: #6b7280;
}

.jars-next b {
  color: var(--text);
}

.jars-awards {
  margin-top: 14px;
  font-size: 20px;
  letter-spacing: 4px;
}

/* ---------- Сторінка логіна адміна ---------- */
.login-wrap {
  display: flex;
  min-height: 100vh;
}

.login-form-col {
  flex: 1;
  max-width: 460px;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-form-col .logo img {
  height: 40px;
}

.login-title {
  font-size: 28px;
  margin: 28px 0 24px;
  color: var(--text);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--grey-800);
}

.login-label input {
  padding: 11px 13px;
  border: 1px solid var(--grey-500);
  border-radius: 8px;
  font-size: 15px;
}

.login-label input:focus {
  outline: 2px solid var(--green-300);
  border-color: var(--green-brand);
}

/* Демо-креди учня вшиті й нередаговані. */
.login-label input[readonly] {
  background: var(--grey-100, #f3f4f6);
  color: var(--grey-800);
  cursor: default;
}

.login-label input[readonly]:focus {
  outline: none;
  border-color: var(--grey-500);
}

.login-error {
  background: #fde8e8;
  color: #b42318;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.login-submit {
  margin: 6px 0 0;
  align-self: flex-start;
  padding: 11px 28px;
}

.login-note {
  color: #6b7280;
  font-size: 13px;
  margin: 22px 0 0;
}

.login-copy {
  color: #9ca3af;
  font-size: 12px;
  margin: 8px 0 0;
}

.login-hero {
  flex: 1;
  background: #e4f9ea;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 56px;
}

.login-hero-art {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1080 / 690;
}

.login-hero-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-hero-photo {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 62%;
  height: auto;
  z-index: 1;
}

.login-hero-slogan {
  color: var(--text);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  max-width: 460px;
  text-align: center;
}

.login-hero-slogan span {
  color: var(--green-brand);
}

@media (max-width: 760px) {
  .login-hero {
    display: none;
  }

  .login-form-col {
    max-width: none;
  }
}

/* Кнопка виходу в адмінці */
.logout-btn {
  margin-left: auto;
}