/* admin/css/podcast-factory.css — หน้าโรงงานพอดแคสต์ธรรมบท (/admin/podcast-factory.php) · สีตาม design.md · ชุดเดียวกับโรงงานการ์ตูน */
[v-cloak] { display: none; }
.pf { --ind: #4f46e5; --ind-d: #312e81; --ind-s: #eef2ff; --pan: #3f7d51; --pan-s: #e9f5eb; --cus: #f5bf45; --cus-s: #fff6d8;
	--err: #e11d48; --err-s: #fff1f2; --ink: #172033; --mut: #566174; --line: #e2e8f0; --paper: #fffdf8;
	color: var(--ink); max-width: 1180px; margin: 0 auto; }
.pf-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
button.pf-card { cursor: pointer; transition: border-color .15s; }
button.pf-card:hover { border-color: #c7d2fe; }
.pf-stat b { display: block; font-size: 1.9rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.pf-stat span { font-size: .8rem; color: var(--mut); font-weight: 600; }

.pf-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 11px; font-size: .78rem; font-weight: 800; white-space: nowrap; }
.pf-st-review { background: var(--cus-s); color: #8a5a00; border: 1px solid #f3d27a; }
.pf-st-working { background: var(--ind-s); color: var(--ind-d); border: 1px solid #c7d2fe; }
.pf-st-working i { animation: pf-spin 2.4s linear infinite; }
.pf-st-stuck { background: var(--err-s); color: #9f1239; border: 1px solid #fecdd3; }
.pf-st-queued { background: #f8fafc; color: #94a3b8; border: 1px solid var(--line); }
.pf-st-approved { background: var(--ind); color: #fff; border: 1px solid var(--ind); }
.pf-st-done { background: var(--pan-s); color: var(--pan); border: 1px solid #b9dcc2; }
.pf-st-skipped { background: #f8fafc; color: #94a3b8; border: 1px dashed #cbd5e1; }
.pf-st-fixing { background: #fff1e6; color: #9a3412; border: 1px solid #fdba74; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

.pf-bar { height: 10px; border-radius: 999px; background: #eef1f6; overflow: hidden; display: flex; }
.pf-bar i { display: block; height: 100%; }
.pf-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .74rem; font-weight: 700; color: var(--mut); }
.pf-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

.pf-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: .85rem; font-weight: 700; color: var(--mut); cursor: pointer; white-space: nowrap; }
.pf-chip.on { background: var(--ind); border-color: var(--ind); color: #fff; }
.pf-chip .n { font-weight: 800; opacity: .75; margin-left: 4px; }

.pf-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); cursor: pointer; }
.pf-row:first-child { border-top: 0; }
.pf-row:hover { background: #fafbff; }
.pf-row.queued .pf-title { color: #64748b; font-weight: 700; }
.pf-q { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: #f1f5f9; color: var(--mut); }
.pf-q.q-published { background: var(--pan-s); color: var(--pan); }
.pf-q.q-approved { background: var(--ind-s); color: var(--ind-d); }
.pf-q.q-review { background: var(--cus); color: #4a3200; }
.pf-q.q-changes { background: #fff1e6; color: #9a3412; }
.pf-q.q-working { background: var(--ind); color: #fff; }
.pf-q.q-stuck { background: var(--err-s); color: #9f1239; }
.pf-title { font-weight: 800; font-size: 1.02rem; line-height: 1.3; }
.pf-sub { font-size: .8rem; color: var(--mut); margin-top: 2px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.pf-tag { background: #f1f5f9; color: var(--mut); border-radius: 6px; padding: 1px 7px; font-size: .72rem; font-weight: 800; }
.pf-tag-warn { background: var(--cus-s); color: #8a5a00; }
.pf-tag i { margin-right: 3px; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--err); display: inline-block; }

.pf-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 12px; padding: 9px 15px; font-weight: 800; font-size: .88rem; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.pf-btn-pri { background: var(--ind); color: #fff; }
.pf-btn-pri:hover { background: #4338ca; }
.pf-btn-ok { background: var(--pan); color: #fff; }
.pf-btn-ok:hover { filter: brightness(1.08); }
.pf-btn-fix { background: #fff1e6; color: #9a3412; border-color: #fdba74; }
.pf-btn-fix:hover { background: #ffe4cc; }
.pf-btn-soft { background: #fff; border-color: var(--line); color: var(--ink); }
.pf-btn-soft:hover { border-color: #c7d2fe; color: var(--ind); }
.pf-btn[disabled] { opacity: .5; cursor: default; }

.pf-drawer-bg { position: fixed; inset: 0; background: rgba(16, 39, 95, .35); z-index: 60; }
.pf-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: #f8fafc; z-index: 61; display: flex; flex-direction: column; box-shadow: -18px 0 40px rgba(16, 39, 95, .18); }
.pf-drawer-h { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 16px; }
.pf-drawer-b { flex: 1; overflow-y: auto; padding: 14px 16px 8px; }

.pf-alert { border-radius: 12px; padding: 10px 12px; font-size: .9rem; line-height: 1.5; }
.pf-alert-err { background: var(--err-s); color: #9f1239; border: 1px solid #fecdd3; }
.pf-alert-fix { background: #fff1e6; color: #9a3412; border: 1px solid #fdba74; }
.pf-alert-ok { background: var(--pan-s); color: #1f5a33; border: 1px solid #b9dcc2; }
.pf-alert-yt { background: #fff5f5; color: #7f1d1d; border: 1px solid #fecaca; }

.pf-part audio { width: 100%; display: block; }
.pf-chapters { display: grid; gap: 2px; counter-reset: none; }
.pf-chapters button { width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 6px 8px; border-radius: 9px; font-size: .9rem; }
.pf-chapters button:hover { background: var(--ind-s); }
.pf-chapters .t { font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ind); min-width: 3.4em; font-size: .82rem; }
.pf-chapters .nm { font-weight: 600; }
.pf-chapters li.on button { background: var(--ind); }
.pf-chapters li.on .t, .pf-chapters li.on .nm { color: #fff; }

.pf-listen { background: var(--cus-s); border-color: #f3d27a; color: #4a3200; }
.pf-listen ul { display: grid; gap: 6px; }
.pf-listen li { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; line-height: 1.45; }

.pf-at { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 800; border-radius: 999px; padding: 1px 8px; cursor: pointer;
	background: var(--ind-s); color: var(--ind-d); white-space: nowrap; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.pf-at:hover { background: #e0e7ff; }
.pf-at-draft { background: var(--ind); color: #fff; cursor: default; }

.pf-script summary { list-style: none; }
.pf-script summary::-webkit-details-marker { display: none; }
.pf-script summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; float: right; color: #94a3b8; font-size: .8rem; transition: transform .15s; }
.pf-script[open] summary::after { transform: rotate(180deg); }
.pf-sc-h1 { font-weight: 800; font-size: 1.05rem; margin: 10px 0 2px; }
.pf-sc-h2 { font-weight: 800; color: var(--ind-d); background: var(--ind-s); border-radius: 8px; padding: 4px 10px; margin: 14px 0 6px; font-size: .92rem; }
.pf-sc-p { font-size: .8rem; color: var(--mut); }
.pf-sc-line { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: start; padding: 5px 0; font-size: .9rem; line-height: 1.55; border-bottom: 1px dashed #eef1f6; }
.pf-sc-line .pf-at { margin-top: 3px; }
.pf-sc-line b { font-weight: 800; color: #9a5b36; margin-right: 6px; }
.pf-sc-line b.nar { color: var(--ind-d); }
.pf-sc-line .src { font-size: .72rem; color: #94a3b8; font-weight: 600; }

.pf-thread { display: flex; flex-direction: column; gap: 10px; }
.pf-msg { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: .95rem; line-height: 1.55; word-break: break-word; }
.pf-msg.owner { align-self: flex-end; background: var(--ind); color: #fff; border-bottom-right-radius: 5px; }
.pf-msg.factory { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.pf-msg .meta { display: block; font-size: .7rem; opacity: .75; margin-bottom: 3px; font-weight: 700; }
.pf-msg.owner .pf-at { background: rgba(255, 255, 255, .22); color: #fff; margin-bottom: 4px; }
.pf-kind { display: inline-block; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 1px 7px; margin: 0 4px 4px 0; background: rgba(255, 255, 255, .22); }
.pf-msg.owner .pf-kind.k-approve, .pf-msg.owner .pf-kind.k-publish { background: #d1fae5; color: #065f46; }
.pf-msg.owner .pf-kind.k-changes { background: #ffedd5; color: #9a3412; }
.pf-msg.factory .pf-kind { background: #f1f5f9; color: var(--mut); }

.pf-compose { background: #fff; border-top: 1px solid var(--line); padding: 10px 12px; }
.pf-compose textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: none; font-size: 16px; line-height: 1.5; min-height: 48px; max-height: 160px; }
.pf-compose textarea:focus { outline: 2px solid #c7d2fe; border-color: var(--ind); }

@media (max-width: 640px) {
	.pf-stat { padding: 10px 12px !important; }
	.pf-stat span { font-size: .72rem; line-height: 1.25; display: block; }
	.pf-stat b { font-size: 1.35rem; }
	.pf-row { grid-template-columns: 36px 1fr; }
	.pf-row .pf-right { grid-column: 2; justify-self: start; }
	.pf-q { width: 34px; height: 34px; font-size: .8rem; }
	main.admin-content { padding: 12px !important; }
}
