:root {
  --bg: #f4f1ea;
  --cream: #faf8f3;
  --card: #ffffff;
  --ink: #2f2a23;
  --ink-soft: #5b554b;
  --muted: #9a9286;
  --line: #ece6db;
  --line-soft: #f1ece3;
  --gold: #bf9560;
  --gold-2: #a87c45;
  --gold-soft: #f3e9d9;
  --gold-tint: #f8f1e6;
  --ok: #6f9b6e;
  --warn: #c9a14a;
  --danger: #c2716b;
  --info: #7fa8c9;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 16px 40px rgba(120, 100, 70, 0.10);
  --shadow-sm: 0 6px 18px rgba(120, 100, 70, 0.07);
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "Segoe UI", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: var(--gold-2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 600; letter-spacing: .2px; }

/* ---------- Кнопки / поля ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  transition: transform .08s ease, box-shadow .2s, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%); color: #fff; border: none; box-shadow: 0 8px 20px rgba(191, 149, 96, .28); }
.btn.primary:hover { filter: brightness(1.04); }
.btn.outline { background: transparent; border-color: var(--gold); color: var(--gold-2); }
.btn.outline:hover { background: var(--gold-tint); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--gold-tint); box-shadow: none; }
.btn.danger { color: var(--danger); border-color: #ecd6d3; background: #fbf3f2; }
.btn.sm { padding: 7px 14px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; display: inline-flex; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.input, .textarea, select.input {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.input:focus, .textarea:focus, select.input:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(191, 149, 96, .14);
}
.textarea { resize: vertical; min-height: 96px; line-height: 1.55; }
label.field { display: block; margin-bottom: 16px; }
label.field > span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 7px; font-weight: 500; }

/* ---------- Логін ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(900px 600px at 80% -10%, #fff 0%, transparent 60%), var(--bg); }
.login-card { width: 100%; max-width: 410px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 40px 34px; box-shadow: var(--shadow); text-align: center; }
.login-logo { font-family: var(--serif); font-size: 30px; font-weight: 700; margin: 0; color: var(--ink); }
.login-logo small { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: 3px; color: var(--gold-2); font-weight: 600; margin-top: 4px; }
.login-sub { color: var(--muted); margin: 12px 0 26px; font-size: 14px; }
.login-card label.field { text-align: left; }
.login-card .btn.primary { width: 100%; padding: 14px; margin-top: 6px; }
.login-hint { margin-top: 20px; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* ---------- Каркас ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.sidebar { background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; }
.sb-logo { padding: 26px 26px 22px; }
.sb-logo .name { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1; }
.sb-logo .tag { font-size: 10px; letter-spacing: 3px; color: var(--gold-2); font-weight: 700; margin-top: 6px; }

.nav { flex: 1; padding: 6px 16px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 13px; width: 100%; background: transparent; border: none;
  color: var(--ink-soft); padding: 12px 14px; border-radius: 12px; text-align: left; font-size: 14.5px; font-weight: 500;
  margin-bottom: 3px; transition: background .15s, color .15s; }
.nav-item .ico { width: 20px; text-align: center; font-size: 17px; opacity: .8; }
.nav-item:hover { background: var(--gold-tint); color: var(--ink); }
.nav-item.active { background: var(--gold-tint); color: var(--gold-2); font-weight: 600; }
.nav-item .pill { margin-left: auto; background: var(--gold); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }

.sb-promo { margin: 14px 16px 18px; background: linear-gradient(160deg, var(--gold-tint), var(--gold-soft));
  border: 1px solid var(--line); border-radius: 18px; padding: 18px; text-align: center; }
.sb-promo .crown { font-size: 22px; }
.sb-promo b { display: block; font-family: var(--serif); font-size: 16px; margin: 6px 0 4px; color: var(--ink); }
.sb-promo p { margin: 0; font-size: 12px; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Контент ---------- */
.content { display: flex; flex-direction: column; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 20px 36px; }
.topbar .greet { font-size: 14px; color: var(--muted); }
.topbar .greet b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: 17px; position: relative; color: var(--ink-soft); }
.icon-btn:hover { box-shadow: var(--shadow-sm); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); border: 2px solid var(--card); }
.bell-btn { transition: transform .15s ease, box-shadow .2s ease; }
.bell-btn:hover { transform: translateY(-1px); }
.bell-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; background: linear-gradient(135deg, #ff7a59, #f0524a); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(240,82,74,.4); }

/* ── Панель сповіщень ── */
.notif-scrim { position: fixed; inset: 0; z-index: 120; background: transparent; }
.notif-pop { position: fixed; z-index: 121; width: 320px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px rgba(60,45,25,.18); overflow: hidden;
  animation: notifIn .18s cubic-bezier(.2,.8,.2,1); transform-origin: top right; }
@keyframes notifIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
.notif-head { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; font-weight: 700; color: var(--ink); font-size: 15px;
  border-bottom: 1px solid var(--line); }
.notif-count { background: var(--gold); color: #fff; font-size: 12px; font-weight: 700;
  min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px; }
.notif-body { max-height: 380px; overflow-y: auto; padding: 6px; }
.notif-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: none; padding: 11px 12px; border-radius: 12px; cursor: pointer; transition: background .15s; }
.notif-row:hover { background: var(--bg-soft, #faf6ee); }
.notif-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; }
.notif-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.notif-sub { font-size: 12.5px; color: var(--muted); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
.notif-arrow { flex: none; color: var(--muted); font-size: 20px; opacity: .5; }
.notif-empty { text-align: center; padding: 34px 20px 38px; }
.notif-empty-ic { font-size: 34px; margin-bottom: 8px; }
.notif-empty-t { font-weight: 700; color: var(--ink); font-size: 15px; }
.notif-empty-s { color: var(--muted); font-size: 13px; margin-top: 3px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 14px 5px 6px; }
.user-chip:hover { box-shadow: var(--shadow-sm); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.user-chip .nm { font-size: 14px; font-weight: 600; color: var(--ink); }
.user-chip .nm small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }

.menu-btn { display: none; }
.main { padding: 8px 36px 40px; }

/* dashboard layout */
.dash { display: grid; grid-template-columns: 1fr 312px; gap: 26px; align-items: start; }
.eyebrow { color: var(--gold-2); font-weight: 600; font-size: 13px; }
h1.title { margin: 4px 0 8px; font-size: 34px; line-height: 1.12; color: var(--ink); }
.lead { color: var(--ink-soft); margin: 0 0 22px; line-height: 1.65; max-width: 560px; }

/* help banner */
.help-card { display: flex; align-items: center; gap: 16px; background: linear-gradient(120deg, var(--gold-soft), var(--gold-tint));
  border: 1px solid var(--line); border-radius: 20px; padding: 18px 22px; margin-bottom: 8px; }
.help-card .txt b { font-family: var(--serif); font-size: 17px; display: block; color: var(--ink); }
.help-card .txt p { margin: 4px 0 12px; font-size: 13px; color: var(--ink-soft); }
.help-card .emoji { font-size: 40px; margin-left: auto; }

/* tabs */
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin: 22px 0 20px; }
.tab { background: none; border: none; padding: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--muted);
  position: relative; }
.tab.active { color: var(--ink); }
.tab.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold); border-radius: 2px; }

/* module card */
.mod-card { display: flex; gap: 20px; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .12s; }
.mod-card:hover { box-shadow: var(--shadow); }
.mod-thumb { width: 132px; height: 96px; border-radius: 14px; flex: none; position: relative; overflow: hidden;
  background-size: cover; background-position: center; display: grid; place-items: center; }
.mod-thumb .num { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.9); color: var(--gold-2);
  font-weight: 800; font-size: 13px; padding: 3px 9px; border-radius: 8px; backdrop-filter: blur(2px); }
.mod-thumb .ph { font-size: 34px; opacity: .85; }
.mod-body { flex: 1; min-width: 0; }
.mod-body h3 { margin: 0 0 5px; font-size: 18px; color: var(--ink); }
.mod-body p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-meta { display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; max-width: 220px; height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 999px; transition: width .5s; }
.mod-meta small { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.mod-card .act { flex: none; }

/* right rail */
.rail .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.rail h4 { margin: 0 0 16px; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); font-family: var(--sans); font-weight: 700; }
.ring-wrap { display: grid; place-items: center; margin-bottom: 14px; }
.ring { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line) 0); }
.ring .inner { width: 104px; height: 104px; border-radius: 50%; background: var(--card); display: grid; place-items: center; text-align: center; }
.ring .pct { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--ink); line-height: 1; }
.ring .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }
.rail .sub { text-align: center; color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; }

.mat-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.mat-item:last-of-type { border-bottom: none; }
.mat-item .mi { width: 40px; height: 40px; border-radius: 10px; background: var(--gold-tint); display: grid; place-items: center; font-size: 18px; flex: none; }
.mat-item .mt { flex: 1; min-width: 0; }
.mat-item .mt b { display: block; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat-item .mt small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }

.daily { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 22px;
  display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.daily .st { font-size: 20px; }

/* generic cards / lists (lesson, homework, admin) */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.card.pad-0 { padding: 0; overflow: hidden; }
.card h3 { margin: 0 0 16px; font-size: 18px; color: var(--ink); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.video-box { position: relative; background: #14110d; aspect-ratio: 16/9; width: 100%; }
.video-box video, .video-box iframe { width: 100%; height: 100%; display: block; border: 0; }

/* ── Custom video player ── */
.video-wrap { border-radius: 12px; background: #0e0c09; }
.video-cover {
  aspect-ratio: 16/9; width: 100%;
  background: #0e0c09;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; gap: 14px;
  border-radius: 12px;
  transition: background .2s;
}
.video-cover:hover { background: #181410; }
.video-play-btn {
  background: none; border: none; cursor: pointer;
  width: 90px; height: 90px;
  transition: transform .15s;
}
.video-play-btn:hover { transform: scale(1.08); }
.video-play-btn svg { width: 100%; height: 100%; }
.video-cover-hint {
  color: rgba(196,160,80,.7); font-size: 13px; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase;
}
.video-wrap video {
  display: block; width: 100%; border-radius: 12px;
  max-height: 70vh;
}
/* Повноекранний режим */
.video-wrap video:fullscreen { border-radius: 0; max-height: 100vh; }
.video-wrap video:-webkit-full-screen { border-radius: 0; max-height: 100vh; }

.video-placeholder { aspect-ratio: 16/9; display: grid; place-items: center; gap: 10px; text-align: center;
  background: linear-gradient(135deg, var(--gold-tint), var(--gold-soft)); color: var(--gold-2); }
.video-placeholder .pl { width: 64px; height: 64px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 26px; box-shadow: var(--shadow-sm); }

.list-item { display: flex; align-items: center; gap: 13px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--cream); }
.list-item .ic { width: 40px; height: 40px; border-radius: 11px; background: var(--gold-tint); display: grid; place-items: center; font-size: 18px; flex: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-size: 14.5px; color: var(--ink); }
.list-item .grow small { color: var(--muted); }

.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.tag.pending { background: #f0ece4; color: var(--muted); }
.tag.review { background: rgba(201,161,74,.16); color: var(--warn); }
.tag.approved { background: rgba(111,155,110,.16); color: var(--ok); }
.tag.revision { background: rgba(194,113,107,.16); color: var(--danger); }

.hw-banner { margin: 4px 0 16px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; border: 1px solid var(--line); }
.hw-banner.review { background: rgba(201,161,74,.10); border-color: #ece0c4; color: var(--warn); }
.hw-banner.approved { background: rgba(111,155,110,.12); border-color: #d6e3d5; color: var(--ok); }
.hw-banner.revision { background: rgba(194,113,107,.10); border-color: #ecd6d3; color: var(--danger); }

.thread { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.thread-title { font-weight: 700; font-size: 14px; margin-bottom: 12px; color: var(--ink); }
.comments { margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.comment { background: var(--cream); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.comment .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 8px; align-items: center; }
.comment .meta .role { padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.comment .meta .role.admin { background: var(--gold-tint); color: var(--gold-2); }
.comment .meta .role.student { background: #eef0ec; color: var(--ink-soft); }
.comment p { margin: 0; line-height: 1.55; font-size: 14px; white-space: pre-wrap; color: var(--ink); }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.stat .num { font-family: var(--serif); font-size: 32px; font-weight: 700; color: var(--gold-2); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th { text-align: left; color: var(--muted); font-weight: 700; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.tbl td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--ink); }
table.tbl tr:last-child td { border-bottom: none; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(60, 50, 35, .35); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { width: 100%; max-width: 540px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; }
.modal h3 { margin: 0 0 20px; font-size: 21px; color: var(--ink); }
.modal .close { float: right; background: transparent; border: none; color: var(--muted); font-size: 24px; line-height: 1; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(120%);
  opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: 14px;
  box-shadow: var(--shadow); z-index: 100; transition: transform .3s, opacity .3s;
  font-size: 14px; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast.err { background: #9a4a44; }
.toast.ok { background: #5d7d5c; }

.section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 6px; }

.placeholder-box { text-align: center; padding: 60px 24px; }
.placeholder-box .pi { font-size: 54px; }
.placeholder-box h2 { font-family: var(--serif); margin: 14px 0 8px; color: var(--ink); }
.placeholder-box p { color: var(--ink-soft); max-width: 420px; margin: 0 auto; line-height: 1.6; }

/* -------- Навчання: список модулів -------- */
.learn-mod { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow-sm); }
.learn-mod-head { display: flex; align-items: center; gap: 16px; padding: 14px 16px; cursor: pointer; }
.learn-mod-head:hover { background: var(--gold-tint); }
.learn-thumb { width: 72px; height: 52px; border-radius: 10px; flex: none; background-size: cover; background-position: center; position: relative; display: grid; place-items: center; }
.learn-thumb .num { position: absolute; top: 4px; left: 4px; background: rgba(255,255,255,.9); color: var(--gold-2); font-weight: 800; font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.learn-mod-info { flex: 1; min-width: 0; }
.learn-mod-info b { display: block; font-size: 15px; color: var(--ink); }
.learn-mod-info span { font-size: 13px; color: var(--muted); }
.learn-mod-arrow { font-size: 13px; color: var(--muted); flex: none; padding: 0 4px; }
.learn-topics { border-top: 1px solid var(--line); background: var(--cream); }
.learn-topic { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); cursor: pointer; transition: background .12s; }
.learn-topic:last-child { border-bottom: none; }
.learn-topic:hover { background: var(--gold-tint); }
.learn-topic.active { background: var(--gold-tint); }
.topic-check { width: 22px; height: 22px; border-radius: 50%; background: var(--card); border: 2px solid var(--line); display: grid; place-items: center; font-size: 11px; flex: none; color: var(--ok); font-weight: 700; }
.learn-topic.active .topic-check { border-color: var(--gold); color: var(--gold-2); }
.topic-title { flex: 1; font-size: 14px; color: var(--ink); }

/* -------- Завдання: канбан -------- */
.tasks-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.task-col { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.task-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 700; font-size: 13px; border-bottom: 1px solid var(--line); }
.task-col-head.pending { background: #f5f3ef; color: var(--muted); }
.task-col-head.review { background: rgba(201,161,74,.10); color: var(--warn); }
.task-col-head.revision { background: rgba(194,113,107,.10); color: var(--danger); }
.task-col-head.approved { background: rgba(111,155,110,.12); color: var(--ok); }
.task-col-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.task-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow .15s; }
.task-card:hover { box-shadow: var(--shadow); }
.task-card-title { font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 4px; }
.task-card-module { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.task-card-comments { font-size: 12px; color: var(--ink-soft); margin-bottom: 8px; }
.task-card-btn { width: 100%; justify-content: center; display: inline-flex; }
@media (max-width: 900px) { .tasks-board { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tasks-board { grid-template-columns: 1fr; } }

/* -------- Бонуси: hero -------- */
.bonuses-hero { height: 200px; border-radius: var(--radius); background-size: cover; background-position: center; position: relative; overflow: hidden; margin-bottom: 4px; display: flex; align-items: flex-end; }
.bonuses-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%); }
.bonuses-hero-text { position: relative; z-index: 1; padding: 20px 24px; color: #fff; }
.bonuses-hero-text h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 22px; }
.bonuses-hero-text p { margin: 0; font-size: 14px; opacity: .88; }

/* -------- Спільнота -------- */
.community-hero { height: 240px; border-radius: var(--radius); background-size: cover; background-position: center top; position: relative; overflow: hidden; margin-bottom: 4px; display: flex; align-items: flex-end; }
.community-hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(40,30,15,.65) 0%, transparent 55%); display: flex; align-items: flex-end; padding: 28px; }
.community-hero-overlay h1 { font-family: var(--serif); font-size: 26px; color: #fff; margin: 0 0 6px; }
.community-hero-overlay p { color: rgba(255,255,255,.85); font-size: 14px; margin: 0; max-width: 500px; }
.community-hero-overlay > div { display: flex; flex-direction: column; }

.feed-post { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.feed-post:last-child { border-bottom: none; }
.feed-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; flex: none; }
.feed-body { flex: 1; min-width: 0; }
.feed-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.feed-meta b { font-size: 14px; }

/* ======== HERO BANNER ======== */
.hero-banner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 0;
  background: linear-gradient(120deg, #fdf6e8 0%, #fffaf0 50%, #fdf3db 100%);
  border: 1px solid #e8d5a0;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 32px;
  min-height: 340px;
  position: relative;
  box-shadow: 0 8px 32px rgba(180,140,50,.13);
}
.hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 80% 10%, rgba(196,160,80,.12) 0%, transparent 60%),
    radial-gradient(ellipse 30% 50% at 10% 90%, rgba(196,160,80,.08) 0%, transparent 60%);
  pointer-events: none;
}
.hero-photo-side {
  position: relative;
  overflow: hidden;
}
.hero-photo {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center top;
  background-color: #3a2a0a;
}
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(253,246,232,.95) 100%);
}
.hero-photo-btn {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff; font-size: 12px; font-weight: 600;
  border-radius: 20px; padding: 5px 14px;
  cursor: pointer; backdrop-filter: blur(6px);
  white-space: nowrap; z-index: 2;
  transition: background .2s;
}
.hero-photo-btn:hover { background: rgba(255,255,255,.25); }
.hero-decor-ring {
  position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px;
  border: 1px solid rgba(196,160,80,.2);
  border-radius: 50%;
  pointer-events: none;
}
.hero-text-side {
  padding: 40px 40px 36px 36px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; z-index: 1;
}
.hero-chip {
  display: inline-block;
  background: rgba(196,160,80,.15);
  border: 1px solid rgba(196,160,80,.5);
  color: #a07820;
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  border-radius: 20px; padding: 4px 14px;
  margin-bottom: 14px; align-self: flex-start;
}
.hero-heading {
  font-family: var(--serif);
  font-size: 34px; font-weight: 700; line-height: 1.15;
  color: var(--ink); margin: 0 0 8px;
}
.hero-name { color: #b08020; }
.hero-sub {
  font-size: 14px; line-height: 1.7;
  color: var(--ink-soft);
  margin: 0 0 22px;
}
.hero-trainer-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 22px;
}
.hero-trainer-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background-size: cover; background-position: center top;
  border: 2px solid #c4a040; flex: none;
}
.hero-trainer-name { font-size: 14px; font-weight: 700; color: var(--ink); }
.hero-trainer-pos { font-size: 12px; color: var(--ink-soft); }
.hero-stats {
  display: flex; gap: 0;
  margin-bottom: 20px;
  border: 1px solid #e2c870;
  border-radius: 12px; overflow: hidden;
  align-self: flex-start;
  background: rgba(255,255,255,.6);
}
.hero-stat {
  padding: 10px 18px;
  border-right: 1px solid #e2c870;
  text-align: center;
}
.hero-stat:last-child { border-right: none; }
.hero-stat b { display: block; font-family: var(--serif); font-size: 20px; color: #a07820; }
.hero-stat small { font-size: 10px; color: var(--ink-soft); letter-spacing: .03em; }
.hero-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.hero-tags span {
  background: rgba(196,160,80,.1);
  border: 1px solid rgba(196,160,80,.3);
  color: #8a6a18;
  font-size: 11px; font-weight: 600;
  border-radius: 20px; padding: 4px 12px;
}
@media(max-width:760px) {
  .hero-banner { grid-template-columns: 1fr; min-height: auto; }
  .hero-photo-side { height: 240px; }
  .hero-text-side { padding: 24px 20px; }
  .hero-heading { font-size: 26px; }
  .hero-stats { flex-wrap: wrap; }
}

/* -------- Бонуси: картки сітка -------- */
/* -------- Блок тренера -------- */
/* ── Trainer hero block (legacy, unused) ── */
.trainer-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  background: linear-gradient(135deg, #fdf8f0 0%, #fffdf9 60%, #faf5ec 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  margin-top: 32px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(180,140,60,.10);
  position: relative;
}
.trainer-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(196,160,80,.13) 0%, transparent 70%);
  pointer-events: none;
}
.trainer-photo-wrap {
  position: relative;
  background: linear-gradient(160deg, #e8d8b0 0%, #c9a84c 100%);
  min-height: 320px;
  overflow: hidden;
}
.trainer-photo {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center top;
  background-color: #d4b87a;
  position: absolute; inset: 0;
  cursor: default;
}
.trainer-photo-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.40);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; opacity: 0;
  transition: opacity .2s;
  cursor: pointer;
  text-align: center; padding: 8px;
}
.trainer-photo-wrap:hover .trainer-photo-overlay { opacity: 1; }
.trainer-badge {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.92);
  border: 1.5px solid var(--gold);
  border-radius: 40px;
  padding: 5px 16px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--gold-dark); white-space: nowrap;
  backdrop-filter: blur(4px);
}
.trainer-info {
  padding: 36px 36px 32px;
  display: flex; flex-direction: column; justify-content: center;
}
.trainer-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 8px;
}
.trainer-name {
  font-family: var(--serif); font-size: 30px; font-weight: 700;
  margin: 0 0 6px; color: var(--ink);
  line-height: 1.15;
}
.trainer-title {
  font-size: 14px; color: var(--gold-dark); font-weight: 600;
  margin: 0 0 14px;
}
.trainer-bio {
  color: var(--ink-soft); font-size: 14px; line-height: 1.75;
  margin: 0 0 22px; max-width: 480px;
}
.trainer-stats { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 22px; }
.ts {
  text-align: center; padding: 10px 20px;
  border-right: 1px solid var(--line);
}
.ts:first-child { padding-left: 0; }
.ts:last-child { border-right: none; }
.ts b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); }
.ts small { font-size: 11px; color: var(--ink-soft); letter-spacing: .03em; }
.trainer-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.trainer-tag {
  background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 5px 14px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}
@media(max-width:700px) {
  .trainer-card { grid-template-columns: 1fr; }
  .trainer-photo-wrap { min-height: 280px; }
  .trainer-info { padding: 24px 20px; }
  .trainer-name { font-size: 24px; }
}
.ts { text-align: center; }
.ts b { display: block; font-size: 20px; font-family: var(--serif); color: var(--gold); }
.ts small { font-size: 12px; color: var(--muted); }

/* -------- Відгуки -------- */
/* ── Video reviews ── */
.rev-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.vrev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.vrev-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.vrev-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.vrev-video-wrap { position: relative; width: 100%; padding-bottom: 56.25%; background: #111; }
.vrev-footer { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.vrev-empty { text-align: center; padding: 60px 20px; color: var(--ink-soft); grid-column: 1/-1; }
/* keep old classes harmless */
.review-hero,.review-score,.review-bars,.rev-bar-row,.rev-bar,.rev-card,.rev-card-head,.rev-stars,.rev-text,.star-picker,.sp-star { display: none; }

/* -------- Відгуки: заголовки секцій -------- */
.rev-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.rev-section-title { font-family: var(--serif); font-size: 22px; margin: 0; color: var(--ink); position: relative; padding-left: 14px; }
.rev-section-title::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--gold), var(--gold-dark)); }

/* -------- Кейси: галерея -------- */
.cases-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.case-card { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-sm); cursor: zoom-in; transition: box-shadow .2s, transform .12s; }
.case-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.case-img { width: 100%; aspect-ratio: 3 / 4; background-size: cover; background-position: center; background-color: var(--cream-2); }
.case-img-video { position: relative; overflow: hidden; }
.case-img-video .case-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: rgba(0,0,0,.55);
  color: #fff; font-size: 20px; display: flex; align-items: center; justify-content: center;
  padding-left: 3px; pointer-events: none;
}
.case-card { cursor: pointer; }
.case-card figcaption { padding: 12px 14px; font-size: 13px; line-height: 1.45; color: var(--ink); font-weight: 600; }
.case-del { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(20,18,16,.62); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background .15s; }
.case-card:hover .case-del { opacity: 1; }
.case-del:hover { background: #c0392b; }
.modal.modal-wide { max-width: 860px; }

/* -------- Відео на весь екран (оверлей) -------- */
.video-fs { position: fixed; inset: 0; z-index: 99999; background: #000; display: flex; align-items: center; justify-content: center; }
.video-fs-el { width: 100%; height: 100%; max-width: 100vw; max-height: 100vh; object-fit: contain; background: #000; }
.video-fs-close { position: absolute; top: 18px; right: 20px; z-index: 5; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(0,0,0,.55); color: #fff; font-size: 22px; font-weight: 700; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s; box-shadow: 0 4px 18px rgba(0,0,0,.5); }
.video-fs-close:hover { background: #c0392b; transform: scale(1.06); }

/* Обкладинка відеовідгуку (заповнює всю картку) */
.vrev-cover .video-cover { position: absolute; inset: 0; aspect-ratio: auto; width: 100%; height: 100%; background: rgba(0,0,0,.18); border-radius: 0; }
.vrev-cover .video-play-btn { width: 68px; height: 68px; }

/* Картка-додавання (відгуки / кейси) */
.vrev-add-card, .case-add-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: var(--gold-tint); border: 2px dashed var(--gold-soft); color: var(--gold-dark);
  border-radius: 14px; cursor: pointer; font-family: var(--serif); font-size: 15px; font-weight: 600;
  min-height: 220px; transition: background .15s, border-color .15s, transform .12s;
}
.vrev-add-card:hover, .case-add-card:hover { background: #fff; border-color: var(--gold); transform: translateY(-2px); }
.vrev-add-card .plus, .case-add-card .plus { font-size: 40px; line-height: 1; }

/* Кейси: горизонтальна карусель */
.cases-carousel { position: relative; }
.cases-rail { display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.cases-rail::-webkit-scrollbar { height: 8px; }
.cases-rail::-webkit-scrollbar-thumb { background: var(--gold-soft); border-radius: 8px; }
.cases-rail::-webkit-scrollbar-track { background: transparent; }
.cases-rail .case-card { flex: 0 0 auto; width: 230px; scroll-snap-align: start; }
.cases-rail .case-add-card { flex: 0 0 auto; width: 200px; }
.cs-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s;
}
.cs-arrow:hover { background: var(--gold-tint); transform: translateY(-50%) scale(1.08); }
.cs-prev { left: -8px; }
.cs-next { right: -8px; }

/* Переглядач кейсу (лайтбокс) з гортанням */
.case-lb { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0; }
.case-lb-stage { width: 100%; text-align: center; }
.case-lb-img { max-width: 100%; max-height: 74vh; border-radius: 12px; display: block; margin: 0 auto; }
.case-lb-cap { margin: 14px 0 0; font-size: 15px; color: var(--ink); font-weight: 600; }
.case-lb-bar { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.case-lb-count { font-size: 13px; color: var(--ink-soft); }
.case-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(20,18,16,.6); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s;
}
.case-lb-nav:hover { background: var(--gold-dark); transform: translateY(-50%) scale(1.08); }
.case-lb-prev { left: -8px; }
.case-lb-next { right: -8px; }
@media (max-width: 560px) {
  .case-lb-prev { left: 2px; }
  .case-lb-next { right: 2px; }
  .case-lb-nav { width: 40px; height: 40px; font-size: 24px; }
}

/* -------- Бонуси: правий рейл -------- */
.bonus-rail-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bonus-rail-item:last-child { border-bottom: none; }
.bonus-rail-item:hover { opacity: .85; }
.bonus-rail-thumb { width: 60px; height: 50px; border-radius: 10px; background-size: cover; background-position: center; background-color: var(--cream-2); flex: none; }
.bonus-rail-info { flex: 1; min-width: 0; }
.bonus-rail-info b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bonus-rail-info small { color: var(--gold); font-size: 12px; }

/* -------- Бонуси: картки сітка -------- */
.bonus-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .12s; }
.bonus-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bonus-card-thumb { height: 150px; background-size: cover; background-position: center; background-color: var(--cream-2); }
.bonus-card-body { padding: 16px; }
.bonus-card-body h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); }
.bonus-card-body p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }

/* -------- Завдання по модулях -------- */
.mod-hw-section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.mod-hw-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; transition: background .15s; }
.mod-hw-head:hover { background: var(--gold-tint); }
.mod-hw-thumb { width: 48px; height: 40px; border-radius: 10px; background-size: cover; background-position: center; background-color: var(--cream-2); flex: none; }
.mod-hw-bar { width: 80px; height: 6px; background: var(--cream-2); border-radius: 99px; overflow: hidden; flex: none; }
.mod-hw-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.mod-hw-arrow { color: var(--muted); font-size: 12px; flex: none; }
.mod-hw-body { display: none; border-top: 1px solid var(--line); }
.mod-hw-body.open { display: block; }
.hw-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.hw-row:last-child { border-bottom: none; }
.hw-row-info { flex: 1; min-width: 0; }
.hw-row-title { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-row-comment { font-size: 12px; color: var(--gold-2); margin-top: 2px; }
.msg-del-btn { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.5); font-size: 11px; padding: 0 2px; margin-left: 6px; transition: color .15s; }
.msg-del-btn:hover { color: #ff6b6b; }

/* -------- Адмін-чат підтримки -------- */
.support-admin-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; height: 72vh; min-height: 480px; }
.sup-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--cream); min-height: 0; }
.sup-search-wrap { position: relative; padding: 12px; border-bottom: 1px solid var(--line); flex: none; }
.sup-search-ico { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .6; pointer-events: none; }
.sup-search { width: 100%; box-sizing: border-box; padding: 9px 12px 9px 32px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--ink); }
.sup-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
.sup-list { overflow-y: auto; flex: 1; min-height: 0; }
.sup-student { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); transition: background .15s; }
.sup-student:hover { background: var(--gold-tint); }
.sup-student.active { background: var(--gold-tint); border-left: 3px solid var(--gold); }
.sup-student .badge { background: var(--gold); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 700; padding: 2px 7px; flex: none; }
.sup-student-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sup-student-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sup-time { font-size: 11px; color: var(--muted); flex: none; }
.sup-preview { display: block; font-size: 12px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.sup-preview.muted { color: var(--muted); font-style: italic; }
.sup-chat { display: flex; flex-direction: column; overflow: hidden; }
.sup-chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); gap: 4px; text-align: center; }
.sup-chat .chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.sup-chat .chat-input-row { border-top: 1px solid var(--line); padding: 12px 16px; display: flex; gap: 8px; }
.msg-time { display: block; font-size: 10px; opacity: .6; margin-top: 4px; text-align: right; }
@media (max-width: 640px) { .support-admin-wrap { grid-template-columns: 1fr; height: auto; } .sup-side { border-right: none; border-bottom: 1px solid var(--line); } .sup-list { height: 220px; } }

/* -------- Підтримка: CTA кнопки -------- */
.support-cta { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; text-decoration: none; color: var(--ink); transition: box-shadow .2s, background .15s; }
.support-cta:hover { box-shadow: var(--shadow); background: var(--gold-tint); }
.support-cta.tg { border-left: 4px solid #2aabee; }
.support-cta.mail { border-left: 4px solid var(--gold); }
.support-cta-ico { font-size: 28px; flex: none; }
.support-cta b { display: block; font-size: 15px; }
.support-cta small { color: var(--muted); font-size: 13px; }
.support-cta-arr { margin-left: auto; color: var(--muted); font-size: 18px; }

/* -------- Чат підтримки -------- */
.chat-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--cream); }
.chat-body { padding: 20px; min-height: 280px; max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.chat-msg { display: flex; align-items: flex-end; gap: 10px; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.chat-avatar.bot-av { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff; }
.chat-avatar.user-av { background: var(--ink); color: #fff; }
.chat-bubble { max-width: 72%; padding: 11px 15px; border-radius: 18px; font-size: 14px; line-height: 1.55; }
.chat-msg.bot .chat-bubble { background: var(--card); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-bubble { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff; border-bottom-right-radius: 4px; }
.chat-input-row { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); background: var(--cream); }
.chat-input { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; font-size: 14px; outline: none; font-family: inherit; resize: none; }
.chat-input:focus { border-color: var(--gold); }
.quick-q { background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; text-align: left; font-size: 13.5px; color: var(--ink); font-weight: 500; transition: background .12s, border-color .12s; }
.quick-q:hover { background: var(--gold-tint); border-color: var(--gold); }

@media (max-width: 1080px) {
  .dash { grid-template-columns: 1fr; }
  .rail { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .rail .panel { margin-bottom: 0; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 60; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-btn { display: inline-grid; place-items: center; }
  .main, .topbar { padding-left: 18px; padding-right: 18px; }
  .rail { grid-template-columns: 1fr; }
  .scrim { position: fixed; inset: 0; background: rgba(40,30,20,.4); z-index: 55; }
  .mod-card { flex-wrap: wrap; }
  .mod-thumb { width: 100%; height: 150px; }
  .mod-card .act { width: 100%; }
  .mod-card .act .btn { width: 100%; }
  h1.title { font-size: 27px; }
  .user-chip .nm { display: none; }
}

/* ── Analytics tiles ── */
.analytics-tile {
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
}
.analytics-tile .num { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink); }
.analytics-tile .lbl { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Like button ── */
.like-btn {
  background: none; border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 12px;
  font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s;
  color: var(--ink-soft);
}
.like-btn:hover { background: var(--cream-2); }
.like-btn.liked { border-color: #e88; color: #c44; background: rgba(220,80,80,.06); }

/* ── HW bar ── */
.hw-bar { height: 6px; background: var(--cream-2); border-radius: 99px; overflow: hidden; }
.hw-bar i { display: block; height: 100%; border-radius: 99px; }

/* ── Завдання в сайдбарі уроку ── */
.lesson-tasks-rail { }
.lesson-task-item { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--gold-soft); }
.lesson-task-item:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.lesson-task-item img { max-width: 100%; border-radius: 8px; display: block; margin-top: 6px; }
.lesson-task-item .video-wrap { margin-top: 6px; border-radius: 8px; }
.lesson-task-item .video-box { margin-top: 6px; }
.lesson-task-item .video-box iframe { border-radius: 8px; }

/* ── Вибір медіа з сервера ── */
.media-pick-item:hover { background: var(--gold-tint); }
.media-pick-item:last-child { border-bottom: none !important; }

/* ── WYSIWYG-редактор (бонуси / завдання) ── */
#lt_text { background: #fff; cursor: text; border-radius: 10px; }
#lt_text:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
#lt_text.ce-empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  pointer-events: none;
}
#lt_text h3 { font-family: var(--serif); font-size: 17px; margin: 12px 0 6px; color: var(--ink); }
#lt_text ul, #rt_text ul { margin: 8px 0; padding-left: 22px; }
#lt_text li, #rt_text li { margin-bottom: 4px; }
#lt_text b, #lt_text strong { color: var(--ink); }
#lt_toolbar .btn.sm, #rt_toolbar .btn.sm { line-height: 1; }

/* WYSIWYG (опис уроку) */
#rt_text { background: #fff; cursor: text; border-radius: 10px; }
#rt_text:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint); }
#rt_text.ce-empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
#rt_text h3 { font-family: var(--serif); font-size: 17px; margin: 12px 0 6px; color: var(--ink); }
#rt_text a { color: var(--gold-2); }

/* Відрендерений rich-text (опис/матеріали) */
.rich-text a { color: var(--gold-2); text-decoration: underline; }
.rich-text h1 { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 18px 0 8px; color: var(--ink); font-weight: 700; }
.rich-text h2 { font-family: var(--serif); font-size: 21px; line-height: 1.3; margin: 16px 0 7px; color: var(--ink); font-weight: 700; }
.rich-text h3 { font-family: var(--serif); font-size: 17px; margin: 12px 0 6px; color: var(--gold-2); font-weight: 700; }
.rich-text p { margin: 0 0 10px; }
.rich-text ul, .rich-text ol { margin: 8px 0; padding-left: 22px; }
.rich-text li { margin-bottom: 4px; }
.rich-text img { max-width: 100%; border-radius: 10px; }
.rich-text h1:first-child, .rich-text h2:first-child, .rich-text h3:first-child, .rich-text p:first-child { margin-top: 0; }

/* Банер-обкладинка бонуса */
.bonus-cover-banner {
  width: 100%; height: 220px; border-radius: var(--radius);
  background-size: cover; background-position: center;
  margin-bottom: 16px; border: 1px solid var(--line);
}
