/* หน้าจอของระบบรายงานการอบรม */
.head-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: space-between; }
.head-row h1 { margin-right: auto; }
.msg.info { background: var(--primary-soft); color: var(--primary); }
.badge.st-draft { background: #eceff3; color: var(--muted); }
.badge.st-wait { background: var(--warn-soft); color: var(--warn); }
.badge.st-ret { background: var(--danger-soft); color: var(--danger); }
.badge.st-ok { background: var(--success-soft); color: var(--success); }
.tag { display: inline-block; font-size: .8rem; padding: 0 .4rem; border-radius: 4px; background: var(--primary-soft); color: var(--primary); }
.nowrap { white-space: nowrap; }
.c { text-align: center; }
tr.dim td { color: var(--muted); }
.req { color: var(--danger); }
.actions.wrap { flex-wrap: wrap; }

.tasklist { list-style: none; margin: 0; padding: 0; }
.tasklist li { display: flex; gap: .75rem; align-items: center; justify-content: space-between; padding: .5rem 0; border-top: 1px solid var(--border); }
.tasklist li:first-child { border-top: 0; }

.card.sec h3 { margin: 0 0 .4rem; }
.card.sec textarea { width: 100%; font: inherit; line-height: 1.4; }
.card.sec .sub { display: block; font-weight: 700; margin: .5rem 0 .2rem; }
.field.sm { flex: 0 1 120px !important; }
.checks { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; align-items: center; margin: .3rem 0; }
.chk { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; margin: .15rem 0; }
.chk input[type=checkbox], .chk input[type=radio] { width: 1.1rem; height: 1.1rem; }
.chk input:not([type]) { min-width: 12rem; }
label.chk { display: flex; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; margin: .5rem 0; }
.thumb { border: 1px solid var(--border); border-radius: var(--radius); padding: .4rem; background: #fafbfc; display: flex; flex-direction: column; gap: .3rem; }
.tim { height: 150px; display: flex; align-items: center; justify-content: center; background: #fff; border-radius: 4px; overflow: hidden; }
.tim img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb textarea.cap { width: 100%; font: inherit; font-size: .95rem; }
.tact { display: flex; gap: .3rem; }
.tact .danger { margin-left: auto; }
.filebtn { cursor: pointer; display: inline-block; }

.savebar { position: sticky; bottom: 0; z-index: 3; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .8rem; margin-top: 1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 -2px 8px rgba(0,0,0,.06); }
.savebar .sp { flex: 1; }

.preview { margin: 1rem 0; background: #e9ecf1; border-radius: var(--radius); overflow: auto; }
.preview iframe { width: 100%; min-width: 820px; height: 1200px; border: 0; display: block; }
.card.review { border-left: 4px solid var(--primary); }
.hist { margin: 0; padding-left: 1.2rem; }

.stats { display: flex; flex-wrap: wrap; gap: .6rem; margin: .6rem 0; }
.stats .stat { flex: 1 1 140px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .5rem .8rem; display: flex; flex-direction: column; }
.stats .stat b { font-size: 1.6rem; color: var(--primary); }
.stats .stat span { color: var(--muted); }

.logo-row { display: flex; gap: 1rem; align-items: center; margin: .5rem 0; }
.logo-row img { width: 90px; height: 90px; object-fit: contain; border: 1px dashed var(--border); border-radius: 6px; background: #fff; }

canvas.sigpad { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; touch-action: none; display: block; }

@media print {
  .topbar, .side, #hub, .noprint, .actions, .head-row button, .row, .nav-shade { display: none !important; }
  .content { padding: 0 !important; }
}
