/* Courses -- creator pages (dark pro-tool look, violet accent). Prefix cr-. */
[hidden] { display: none !important; }
.cr-wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px 70px; }
.cr-narrow { max-width: 860px; }
.cr-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.cr-head > div:first-child { flex: 1 1 260px; min-width: 0; }
.cr-head .mu-page-title { margin-bottom: 2px; overflow-wrap: anywhere; }
.cr-head-r { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cr-sub { color: var(--text-dim); font-size: 13.5px; margin: 0; overflow-wrap: anywhere; }
.mu-panel p, .mu-panel li { overflow-wrap: anywhere; }
.cr-dim { color: var(--text-dim); font-size: 13px; }
.cr-small { font-size: 12px; }
.cr-num { font-variant-numeric: tabular-nums; }
.cr-r { text-align: right; }
.cr-good { color: #34d399; font-style: normal; }
.cr-bad { color: #f87171; font-style: normal; }
.cr-hide-sm { }
.cr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cr-kpi { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.cr-kpi span { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 800; }
.cr-kpi b { display: block; font-size: 24px; font-weight: 800; color: #fff; margin: 4px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cr-kpi em { font-style: normal; font-size: 12px; color: var(--text-dim); }
.cr-kpi.hot { background: linear-gradient(135deg, rgba(124,58,237,.28), rgba(76,29,149,.18)); border-color: rgba(167,139,250,.4); }
.cr-two { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cr-two > div { min-width: 0; }
.cr-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 20px 22px; border-radius: 14px; margin-bottom: 16px;
  background: radial-gradient(circle at 0% 0%, rgba(139,92,246,.35), transparent 60%), var(--bg-2); border: 1px solid rgba(167,139,250,.35); }
.cr-hero h2 { margin: 0 0 4px; color: #fff; font-size: 1.2rem; }
.cr-hero p { margin: 0; color: var(--text-mid); font-size: 13.5px; max-width: 620px; }
.cr-grow { flex: 1 1 280px; min-width: 0; }
.cr-big { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 11px; font-weight: 800; font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: 1px solid var(--accent); box-shadow: 0 10px 26px -12px var(--accent); cursor: pointer; }
.cr-big:hover { color: #fff; transform: translateY(-1px); }
.cr-list { list-style: none; margin: 0; padding: 0; }
.cr-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); min-width: 0; }
.cr-list li:first-child { border-top: 0; }
.cr-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--text); }
.cr-list .t b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-list .t span { font-size: 12px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-list a.t:hover b { color: var(--accent-hot); }
.cr-ava { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #8b5cf6, #4c1d95); }
.cr-bar { height: 7px; background: var(--bg-3); border-radius: 4px; overflow: hidden; min-width: 60px; }
.cr-bar i { display: block; height: 100%; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); border-radius: 4px; }
.cr-bar.done i { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.cr-upsell { padding: 11px 14px; border-radius: 10px; border: 1px dashed rgba(167,139,250,.5); background: rgba(124,58,237,.08); color: var(--text-mid); font-size: 13px; margin: 0 0 14px; }
.cr-locked { padding: 10px 13px; border-radius: 10px; background: var(--bg-3); color: var(--text-mid); font-size: 13px; margin: 8px 0; }
.cr-empty .big { font-size: 44px; }

/* course cards */
.cr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.cr-card { background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; color: var(--text); }
.cr-card:hover { border-color: rgba(167,139,250,.55); color: var(--text); }
.cr-cover { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #4c1d95, #1e1b4b); background-size: cover; background-position: center; position: relative; display: grid; place-items: center; color: rgba(255,255,255,.75); font-size: 34px; }
.cr-cover .ui-pill { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.55); }
.cr-card-b { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cr-card-b h3 { margin: 0; font-size: 15px; color: #fff; overflow-wrap: anywhere; }
.cr-card-b .cr-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); }
.cr-card-b .cr-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 6px; }
.cr-price { font-weight: 800; color: #ddd6fe; }

/* tabs inside a page */
.cr-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.cr-tabs a { padding: 10px 14px; color: var(--text-dim); font-weight: 700; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cr-tabs a:hover { color: var(--text); }
.cr-tabs a.on { color: #fff; border-bottom-color: var(--accent); }

/* curriculum builder */
.cr-sec { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.cr-sec-h { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cr-sec-h h3 { margin: 0; font-size: 14px; color: #fff; flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.cr-sec-h .cr-dim { font-size: 12px; }
.cr-les { list-style: none; margin: 0; padding: 4px 0; }
.cr-les li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; min-width: 0; touch-action: pan-y; }
.cr-les li + li { border-top: 1px solid rgba(38,44,58,.6); }
.cr-les li.dragging { opacity: .55; background: var(--bg-3); }
.cr-les .k { flex: 0 0 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); font-size: 13px; }
.cr-les .k.video { background: rgba(124,58,237,.18); color: #c4b5fd; }
.cr-les .k.quiz { background: rgba(251,191,36,.14); color: #fbbf24; }
.cr-les .k.download { background: rgba(52,211,153,.13); color: #34d399; }
.cr-les .n { flex: 1; min-width: 0; color: var(--text); }
.cr-les .n b { display: block; font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-les .n span { font-size: 12px; color: var(--text-dim); }
.cr-les .n:hover b { color: var(--accent-hot); }
.cr-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 7px; border-radius: 6px; background: var(--bg-3); color: var(--text-mid); margin-left: 4px; vertical-align: 1px; }
.cr-tag.prev { background: rgba(52,211,153,.14); color: #34d399; }
.cr-tag.drip { background: rgba(96,165,250,.14); color: #93c5fd; }
.cr-tag.draft { background: rgba(251,191,36,.13); color: #fbbf24; }
.cr-move { display: inline-flex; gap: 2px; }
.cr-move button, .cr-icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-1); color: var(--text-mid); cursor: pointer; font-size: 13px; display: inline-grid; place-items: center; padding: 0; }
.cr-move button:hover, .cr-icon:hover { color: #fff; border-color: var(--border-hi); }
.cr-grip { cursor: grab; color: var(--text-muted); font-size: 16px; width: 22px; text-align: center; user-select: none; -webkit-user-select: none; touch-action: none; }
.cr-add { display: flex; gap: 8px; padding: 10px 14px 13px; flex-wrap: wrap; }

/* forms */
.cr-form { display: grid; gap: 14px; }
.cr-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cr-f > label, .cr-lbl { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); font-weight: 800; }
.cr-f .ui-in, .cr-f textarea, .cr-f select { width: 100%; box-sizing: border-box; }
.cr-f textarea { min-height: 96px; padding: 10px 11px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 9px; font: inherit; font-size: 14px; resize: vertical; }
.cr-f textarea:focus { outline: none; border-color: var(--accent); }
.cr-help { font-size: 12px; color: var(--text-dim); margin: 0; }
.cr-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cr-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-mid); cursor: pointer; min-height: 32px; }
.cr-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; }
.cr-check b { color: var(--text); }
.cr-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cr-prefix { display: flex; align-items: stretch; min-width: 0; }
.cr-prefix span { display: inline-flex; align-items: center; padding: 0 10px; background: var(--bg-3); border: 1px solid var(--border); border-right: 0; border-radius: 9px 0 0 9px; color: var(--text-dim); font-size: 13px; white-space: nowrap; }
.cr-prefix .ui-in { border-radius: 0 9px 9px 0; flex: 1; min-width: 0; }

/* rich text editor */
.cr-rte { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); overflow: hidden; }
.cr-rte-bar { display: flex; gap: 2px; padding: 5px; border-bottom: 1px solid var(--border); background: var(--bg-1); flex-wrap: wrap; }
.cr-rte-bar button { min-width: 34px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: var(--text-mid); font-weight: 700; cursor: pointer; font-size: 13px; padding: 0 8px; }
.cr-rte-bar button:hover { background: var(--bg-3); color: #fff; }
.cr-rte-ed { min-height: 220px; padding: 14px 16px; outline: none; font-size: 15px; line-height: 1.65; color: var(--text); overflow-wrap: anywhere; }
.cr-rte-ed:empty::before { content: attr(data-ph); color: var(--text-muted); }
.cr-rte-ed h2 { font-size: 1.3rem; margin: .6em 0 .3em; } .cr-rte-ed h3 { font-size: 1.1rem; margin: .6em 0 .3em; }
.cr-rte-ed blockquote { border-left: 3px solid var(--accent); margin: .6em 0; padding: 2px 12px; color: var(--text-mid); }
.cr-rte-ed pre { background: #05070b; padding: 10px; border-radius: 8px; overflow-x: auto; }

/* uploads */
.cr-drop { border: 2px dashed var(--border-hi); border-radius: 12px; padding: 22px 16px; text-align: center; color: var(--text-dim); cursor: pointer; transition: border-color .15s, background .15s; }
.cr-drop:hover, .cr-drop.over { border-color: var(--accent); background: rgba(124,58,237,.07); color: var(--text); }
.cr-drop b { color: #fff; }
.cr-upl { margin-top: 10px; display: grid; gap: 8px; }
.cr-upl-i { background: var(--bg-1); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.cr-upl-i .top { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; min-width: 0; }
.cr-upl-i .top b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-upl-i .cr-bar { height: 6px; }
.cr-upl-i.err { border-color: rgba(248,113,113,.45); }
.cr-video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.cr-files { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.cr-files li { display: flex; align-items: center; gap: 10px; background: var(--bg-1); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; min-width: 0; font-size: 13px; }
.cr-files li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* quiz builder */
.cr-q { background: var(--bg-1); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; }
.cr-q-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cr-q-h b { flex: 1; color: #fff; }
.cr-opt { display: flex; gap: 8px; align-items: center; }
.cr-opt input[type=text] { flex: 1; min-width: 0; }
.cr-opt label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-dim); white-space: nowrap; min-height: 38px; cursor: pointer; }
.cr-opt label input { accent-color: #34d399; width: 17px; height: 17px; }

/* tables */
.cr-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cr-table th { text-align: left; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); font-weight: 800; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cr-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cr-table tr:last-child td { border-bottom: 0; }
.cr-table a.cr-strong { color: var(--text); font-weight: 700; }
.cr-table a.cr-strong:hover { color: var(--accent-hot); }
.cr-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.cr-filters .ui-in { flex: 0 1 220px; }
.cr-filters .ui-in.grow { flex: 1 1 220px; }

/* questions / comments */
.cr-thread { border: 1px solid var(--border); border-radius: 12px; background: var(--bg-2); padding: 14px 16px; margin-bottom: 12px; }
.cr-thread.new { border-color: rgba(167,139,250,.55); }
.cr-thread .who { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.cr-thread .who b { color: #fff; }
.cr-thread .body { color: var(--text-mid); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-reply { margin: 10px 0 0 22px; padding: 10px 12px; border-left: 3px solid var(--accent); background: var(--bg-1); border-radius: 0 10px 10px 0; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cr-reply-f { display: flex; gap: 8px; margin-top: 10px; }
.cr-reply-f textarea { flex: 1; min-height: 44px; min-width: 0; padding: 9px 11px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 9px; font: inherit; resize: vertical; }

/* reports */
.cr-funnel { display: grid; gap: 8px; }
.cr-funnel div { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 10px; align-items: center; font-size: 13px; }
.cr-funnel .cr-bar { height: 16px; border-radius: 6px; }
.cr-funnel .cr-bar i { border-radius: 6px; }
.cr-chart { min-height: 220px; }

/* dialog */
dialog.ui-dlg form { margin: 0; }
dialog.ui-dlg .cr-f { margin-bottom: 12px; }
dialog.ui-dlg.wide { width: min(620px, calc(100vw - 32px)); }

/* settings */
.cr-set { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 18px; align-items: start; }
.cr-set-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 70px; }
.cr-set-nav a { padding: 9px 12px; border-radius: 9px; color: var(--text-dim); font-weight: 700; font-size: 13.5px; }
.cr-set-nav a:hover { background: var(--bg-2); color: var(--text); }
.cr-set-nav a.on { background: rgba(124,58,237,.16); color: #fff; }
.cr-app { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.cr-app:first-of-type { border-top: 0; }
.cr-app .ico { flex: 0 0 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; color: #fff; }
.cr-app .t { flex: 1 1 240px; min-width: 0; }
.cr-app .t b { color: #fff; }
.cr-code { background: #05070b; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font: 12.5px/1.5 var(--mono); color: #d7e3f4; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }

@media (max-width: 900px) {
  .cr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cr-two, .cr-set { grid-template-columns: minmax(0, 1fr); }
  .cr-set-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .cr-set-nav a { white-space: nowrap; }
}
@media (max-width: 640px) {
  .cr-wrap { padding: 14px 12px 70px; }
  .cr-hide-sm { display: none; }
  .cr-row, .cr-row3 { grid-template-columns: minmax(0, 1fr); }
  .cr-kpi b { font-size: 20px; }
  .cr-table thead { display: none; }
  .cr-table, .cr-table tbody, .cr-table tr, .cr-table td { display: block; width: 100%; box-sizing: border-box; }
  .cr-table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .cr-table td { border: 0; padding: 3px 0; }
  .cr-table td[data-l]::before { content: attr(data-l) ': '; color: var(--text-muted); font-size: 11.5px; }
  .cr-table td.cr-r { text-align: left; }
  .cr-funnel div { grid-template-columns: 96px minmax(0, 1fr) 54px; }
  .mu-btn, .cr-move button, .cr-icon { min-height: 44px; min-width: 44px; }
  .mu-btn-sm { min-height: 40px; }
  .cr-les li { padding: 8px 10px; gap: 8px; }
  .cr-les .n b { white-space: normal; }
  .cr-les .cr-move, .cr-sec-h .cr-move { display: none; }
  .cr-sec-h { padding: 10px; }
  .cr-reply { margin-left: 8px; }
}
