/* ===== Platform components (dynamic pages) — extends app.css ===== */

/* ---------- forms ---------- */
.lbl2{display:block;font-size:13px;font-weight:700;color:var(--ink2);margin:18px 0 7px}
.lbl2:first-child{margin-top:0}
.inp{width:100%;height:44px;border:1px solid #d4d4d4;border-radius:8px;background:#fff;
  padding:0 14px;font-family:var(--sans);font-size:15px;color:var(--ink2)}
.inp:focus{outline:none;border-color:#8a8f98}
textarea.inp{height:auto;min-height:96px;padding:12px 14px;resize:vertical;line-height:1.5}
select.inp{appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 12px center;padding-right:38px}
.hint{font-size:13px;color:var(--muted2);margin-top:7px;line-height:1.45}
.err{background:#fdecec;border:1px solid #f5c2c7;color:#842029;border-radius:8px;
  padding:12px 14px;font-size:14px;margin-bottom:16px}
.ok-note{background:#e7f6ee;border:1px solid #badbcc;color:#0f5132;border-radius:8px;
  padding:12px 14px;font-size:14px;margin-bottom:16px}

/* ---------- modal ---------- */
.ovl{position:fixed;inset:0;background:rgba(17,17,17,.45);z-index:100;display:flex;
  align-items:flex-start;justify-content:center;padding:80px 20px 40px}
.mdl{background:#fff;border-radius:12px;width:520px;max-width:100%;padding:28px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);max-height:calc(100vh - 130px);overflow:auto}
.mdl h3{font-size:20px;font-weight:700;color:var(--ink2);margin-bottom:6px}
.mdl .msub{font-size:14px;color:var(--muted);margin-bottom:14px}
.mdl .acts{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#222;
  color:#fff;font-size:14px;font-weight:600;padding:12px 20px;border-radius:10px;z-index:200;
  box-shadow:0 8px 30px rgba(0,0,0,.3);max-width:80vw}
.toast.error{background:#b91c1c}

/* ---------- row action menu ---------- */
.rowmenu{position:absolute;background:#fff;border:1px solid var(--border);border-radius:10px;
  box-shadow:0 10px 34px rgba(0,0,0,.14);padding:6px;z-index:50;min-width:180px}
.rowmenu a{display:block;padding:9px 12px;font-size:14px;color:var(--ink2);border-radius:7px;cursor:pointer}
.rowmenu a:hover{background:#f3f4f6}
.rowmenu a.danger{color:#b91c1c}

/* ---------- small toggle ---------- */
.toggle-sw.sm{width:36px;height:20px}
.toggle-sw.sm::after{width:14px;height:14px}

/* ---------- progress bar ---------- */
.prog{height:8px;border-radius:999px;background:#e9ebee;overflow:hidden}
.prog>span{display:block;height:100%;background:var(--teal);border-radius:999px}

/* ---------- curriculum editor ---------- */
.cur-wrap{max-width:920px}
.sec-card{border:1px solid var(--border);border-radius:10px;background:#fff;margin-top:20px;overflow:visible}
.sec-head{display:flex;align-items:center;gap:12px;padding:14px 16px;background:var(--card);
  border-bottom:1px solid var(--border);border-radius:10px 10px 0 0}
.sec-head .drag{cursor:grab;color:#9aa0a6;font-size:15px;letter-spacing:1px;user-select:none}
.sec-name{flex:1;border:1px solid transparent;border-radius:6px;background:transparent;
  font-family:var(--sans);font-size:16px;font-weight:700;color:var(--ink2);padding:7px 10px}
.sec-name:hover{border-color:#d4d4d4;background:#fff}
.sec-name:focus{outline:none;border-color:#8a8f98;background:#fff}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;
  border:1px solid transparent;border-radius:8px;background:transparent;color:#6b7280;cursor:pointer}
.icon-btn:hover{border-color:#d4d4d4;background:#fff;color:#1f2933}
.icon-btn .icon{width:17px;height:17px;stroke-width:2}
.lec-list{min-height:6px}
.lec-row{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid #eef0f2}
.lec-row:last-child{border-bottom:0}
.lec-row.dragging{opacity:.4}
.lec-row .drag{cursor:grab;color:#c3c8cf;font-size:14px;letter-spacing:1px;user-select:none}
.lec-row .licon{width:18px;height:18px;color:#6b7280;stroke-width:1.8;flex:0 0 auto}
.lec-name{flex:1;font-size:15px;color:#20303f;text-decoration:underline;text-underline-offset:2px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lec-badge{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:4px 9px;border-radius:6px;background:#eceef1;color:#6b7280;flex:0 0 auto}
.lec-badge.pub{background:#dfeaff;color:#20303f}
.add-lec{display:flex;align-items:center;gap:9px;margin:12px 16px 16px;padding:11px 14px;
  border:1px dashed #c9ced6;border-radius:8px;background:#fff;color:#374151;font-family:var(--sans);
  font-size:14px;font-weight:600;cursor:pointer}
.add-lec:hover{border-color:#8a8f98}
.add-lec .icon{width:16px;height:16px;stroke-width:2.2}

/* ---------- upload ---------- */
.uparea{border:1px dashed #c9ced6;border-radius:10px;background:#fff;padding:30px;
  text-align:center;color:var(--muted);cursor:pointer}
.uparea:hover{border-color:#8a8f98}
.uparea b{color:var(--ink2)}
.upbar{margin-top:14px;height:10px;border-radius:999px;background:#e9ebee;overflow:hidden;display:none}
.upbar>span{display:block;height:100%;background:var(--teal);width:0%;transition:width .15s}
.upmeta{margin-top:10px;font-size:13px;color:var(--muted2);display:none}

/* ---------- course editor top ---------- */
.course-top{position:sticky;top:0;z-index:5;background:#fff;border-bottom:1px solid var(--border);
  height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 32px;gap:16px}
.course-top .cname{font-size:18px;font-weight:700;color:var(--ink2);overflow:hidden;
  text-overflow:ellipsis;white-space:nowrap}
.course-top .right{display:flex;align-items:center;gap:12px;flex:0 0 auto}
.status-chip{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;
  letter-spacing:.04em;text-transform:uppercase;padding:6px 11px;border-radius:6px}
.status-chip.published{background:#dfeaff;color:#20303f}
.status-chip.unlisted{background:#f6edc7;color:#6b5518}
.status-chip.unpublished{background:#eceef1;color:#6b7280}

/* clickable table rows */
tr.rowlink{cursor:pointer}
tr.rowlink:hover td{background:#fafbfc}
