/* =====================================================================
   PAGE: Training (/training) — templates/training.html
   ===================================================================== */
.tp-wrap{display:flex;height:calc(100vh - 60px)}
/* left list */
.tp-list{width:360px;flex:0 0 360px;border-right:1px solid var(--line);background:var(--panel);display:flex;flex-direction:column;overflow:hidden}
.tp-search{padding:12px 14px;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.tp-search input,.tp-search select{width:100%;font-family:inherit;font-size:13px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;background:var(--bg);color:var(--ink);box-sizing:border-box}
.tp-search input:focus,.tp-search select:focus{outline:none;border-color:var(--blue-600)}
.tp-count{font-size:11.5px;color:var(--faint);font-weight:600;padding:0 2px}
.tp-rows{overflow-y:auto;flex:1}
.qrow{padding:12px 14px;border-bottom:1px solid var(--line);cursor:pointer;display:flex;gap:10px;align-items:flex-start;transition:.1s}
.qrow:hover{background:var(--tint)}
.qrow.sel{background:var(--blue-50)}
.qrow.sel::before{content:"";position:absolute;left:60px;width:3px;height:auto}
.qrow .qtxt{flex:1;min-width:0;font-size:13.5px;font-weight:600;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.qrow .qsub{font-size:11px;color:var(--faint);margin-top:3px;font-weight:500}
.qbadge{flex:0 0 auto;background:var(--blue-600);color:#fff;font-size:11px;font-weight:800;padding:2px 9px;border-radius:20px;min-width:20px;text-align:center}
.qbadge.one{background:#e2e8f0;color:#64748b}
.tp-empty{padding:40px 20px;text-align:center;color:var(--faint);font-size:13.5px}

/* right editor */
.tp-edit{flex:1;overflow-y:auto;padding:26px 30px}
.ed-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--faint);gap:10px;text-align:center}
.ed-q{font-size:18px;font-weight:800;line-height:1.4;margin-bottom:6px}
.ed-meta{font-size:12.5px;color:var(--faint);margin-bottom:20px}
.ed-meta b{color:var(--blue-700)}
.ed-lbl{font-size:11px;font-weight:700;color:var(--faint);text-transform:uppercase;letter-spacing:.04em;margin:0 0 6px;display:block}
.ed-fld{margin-bottom:16px}
.ed-fld input,.ed-fld textarea{width:100%;font-family:inherit;font-size:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--ink);box-sizing:border-box}
.ed-fld input:focus,.ed-fld textarea:focus{outline:none;border-color:var(--blue-600)}
.ed-fld textarea{min-height:120px;resize:vertical}
.ed-hint{font-size:11.5px;color:var(--faint);margin-top:6px}
.ed-hint code{background:var(--tint);padding:1px 5px;border-radius:5px}
.ed-actions{display:flex;gap:10px;margin-top:4px}
.b{border:none;border-radius:12px;padding:13px 20px;font-weight:800;font-size:14px;cursor:pointer;font-family:inherit}
.b.primary{background:var(--grad);color:#fff;flex:1}
.b.ghost{background:#eef2f8;color:var(--muted)}
body.dark .b.ghost{background:#1a2330;color:#aeb9cc}
body.dark .tp-search input,body.dark .tp-search select{background:#0b121d}

@media (max-width:760px){
  .tp-list{width:100%;flex:1 0 100%}
  .tp-list.hide-m{display:none}
  .tp-edit.show-m{display:block}
  .tp-edit{display:none}
}

/* top bar er stats chip (ager .tp-bar .ts) */
.pg-actions .stats{display:flex;gap:6px}
.pg-actions .ts{font-size:12px;font-weight:700;background:var(--tint);color:var(--muted);padding:6px 11px;border-radius:20px}
.pg-actions .ts.warn{background:#fef3c7;color:#92400e}
body.dark .pg-actions .ts.warn{background:rgba(251,191,36,.18);color:#fcd34d}
body.page-training{height:100vh;overflow:hidden}
