/* =====================================================================
   ANALISIS PTO — gaya tampilan (simpan di: public/css/pto-generator.css)
   ===================================================================== */
#ptoApp { max-width: 1320px; margin: 0 auto; color: #e2e8f0; }
#ptoApp label { display: block; font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 4px; }
#ptoApp input, #ptoApp select, #ptoApp textarea, #ptoApp button { box-sizing: border-box; font-family: inherit; }
.pto-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.pto-head h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pto-head p { color: #94a3b8; font-size: 14px; margin: 0; max-width: 900px; line-height: 1.55; }
.pto-beta { font-size: 10px; letter-spacing: .08em; background: linear-gradient(135deg, #10b981, #0ea5e9); color: #fff; padding: 3px 8px; border-radius: 999px; }
.pto-steps { display: flex; gap: 6px; } .pto-steps span { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(148,163,184,.3); color: #64748b; } .pto-steps span.on { color: #a7f3d0; border-color: rgba(16,185,129,.6); background: rgba(16,185,129,.12); }
.pto-card { background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 18px; margin-bottom: 14px; }
.pto-card h4 { margin: 0 0 10px; font-size: 15px; color: #f1f5f9; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pto-card h4 small { color: #94a3b8; font-weight: 500; font-size: 12px; }
.pto-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.pto-warn { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.45); color: #fde68a; padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; line-height: 1.5; }
.pto-hint { color: #94a3b8; font-size: 12px; margin: 6px 0 0; } .pto-center { text-align: center; } .pto-mt { margin-top: 14px !important; } .pto-hide { display: none; }
.pto-link { background: none; border: 0; color: #7dd3fc; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; font-size: inherit; }
.pto-in { width: 100%; padding: 8px 10px; border-radius: 9px; background: rgba(15,23,42,.75); border: 1px solid rgba(100,116,139,.5); color: #f1f5f9; outline: none; font-size: 13.5px; }
.pto-in:focus { border-color: #34d399; box-shadow: 0 0 0 3px rgba(52,211,153,.15); }
textarea.pto-in { resize: vertical; line-height: 1.45; }
select.pto-in { appearance: auto; }
.pto-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px 12px; }
.pto-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.pto-full { grid-column: 1 / -1; } .pto-half { grid-column: span 2; }
.pto-btn-main { background: linear-gradient(135deg, #10b981, #0ea5e9); color: #fff; border: 0; padding: 11px 18px; border-radius: 12px; font-weight: 800; cursor: pointer; font-size: 14px; margin-top: 10px; transition: .2s; }
.pto-btn-main:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -8px rgba(16,185,129,.7); }
.pto-wide { width: 100%; padding: 14px; font-size: 15px; }
.pto-btn-ghost { display: inline-flex; align-items: center; gap: 6px; background: rgba(148,163,184,.12); border: 1px solid rgba(148,163,184,.35); color: #e2e8f0; padding: 8px 12px; border-radius: 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; white-space: nowrap; margin: 6px 6px 0 0; text-transform: none !important; letter-spacing: 0 !important; }
.pto-btn-ghost:hover { border-color: #34d399; color: #fff; }
.pto-btn-dl { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: 0; padding: 9px 16px; border-radius: 10px; font-weight: 800; cursor: pointer; white-space: nowrap; margin-top: 6px; }
.pto-chip { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.45); color: #a7f3d0; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pto-x { background: none; border: 0; color: #64748b; cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 6px; }
.pto-x:hover { color: #f87171; background: rgba(248,113,113,.12); }
.pto-filebar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.pto-file { background: rgba(148,163,184,.14); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12px; display: inline-flex; gap: 4px; align-items: center; }
.pto-file button { background: none; border: 0; color: #94a3b8; cursor: pointer; }
.pto-caselist { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; margin-bottom: 4px; }
.pto-case { display: flex; gap: 4px; } .pto-case > button:first-child { flex: 1; text-align: left; background: rgba(15,23,42,.6); border: 1px solid rgba(148,163,184,.25); color: #e2e8f0; border-radius: 10px; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.pto-case > button:first-child:hover { border-color: #34d399; } .pto-case small { display: block; color: #94a3b8; font-size: 11px; }
.pto-calc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.pto-calc > div { background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(14,165,233,.1)); border: 1px solid rgba(52,211,153,.35); border-radius: 12px; padding: 10px 12px; }
.pto-calc span { display: block; font-size: 11px; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pto-calc b { display: block; font-size: 20px; color: #a7f3d0; margin: 2px 0; } .pto-calc small { color: #cbd5e1; font-size: 11.5px; }
.pto-tblwrap { overflow-x: auto; border-radius: 10px; border: 1px solid rgba(148,163,184,.2); }
.pto-tbl { border-collapse: collapse; width: 100%; font-size: 13px; }
.pto-tbl th { background: rgba(15,23,42,.9); color: #a7f3d0; font-size: 11.5px; padding: 6px; white-space: nowrap; text-align: left; }
.pto-tbl td { border-top: 1px solid rgba(148,163,184,.14); padding: 3px 4px; vertical-align: middle; }
.pto-lab .pto-sticky { position: sticky; left: 0; background: #1e293b; z-index: 1; min-width: 190px; }
.pto-lab th.pto-sticky { background: #0f172a; }
.pto-lab td small { color: #94a3b8; }
.pto-date { width: 128px; padding: 4px 6px; font-size: 12px; display: inline-block; }
.pto-rg { white-space: nowrap; color: #64748b; } .pto-num { width: 58px; padding: 4px; font-size: 12px; text-align: center; display: inline-block; }
.pto-val { width: 78px; padding: 5px; text-align: center; font-weight: 700; }
.pto-val.fH { background: rgba(239,68,68,.22); border-color: #ef4444; color: #fecaca; }
.pto-val.fL { background: rgba(59,130,246,.22); border-color: #3b82f6; color: #bfdbfe; }
.pto-addrow { margin-top: 8px; max-width: 360px; }
.pto-obat td { min-width: 90px; } .pto-obat td:first-child { min-width: 170px; } .pto-obat td:nth-child(5), .pto-obat td:nth-child(6) { min-width: 140px; }
.pto-gantt { margin-top: 12px; overflow-x: auto; font-size: 11px; }
.pto-g-head, .pto-g-row { display: grid; align-items: center; min-width: max-content; }
.pto-g-head i { font-style: normal; color: #94a3b8; text-align: center; border-left: 1px solid rgba(148,163,184,.15); padding: 2px 0; }
.pto-g-head span { color: #a7f3d0; font-weight: 700; }
.pto-g-row { margin-top: 3px; } .pto-g-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e2e8f0; font-weight: 700; padding-right: 6px; }
.pto-g-bar { background: linear-gradient(90deg, #0ea5e9, #6366f1); color: #fff; border-radius: 6px; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.pto-g-bar.on { background: linear-gradient(90deg, #10b981, #0ea5e9); box-shadow: inset -6px 0 0 rgba(255,255,255,.35); }
/* hasil */
.pto-bar { display: flex; flex-wrap: wrap; gap: 0; align-items: center; background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 4px 10px 10px; margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.pto-sum { margin: 0 0 10px; color: #e2e8f0; line-height: 1.55; }
.pto-kpis { display: flex; flex-wrap: wrap; gap: 6px; } .pto-kpis span { font-size: 12px; background: rgba(15,23,42,.6); border: 1px solid rgba(148,163,184,.25); padding: 5px 10px; border-radius: 999px; }
.pto-kpis b { color: #fff; } .pto-kpis .t { border-color: #ef4444; } .pto-kpis .s { border-color: #f59e0b; } .pto-kpis .r { border-color: #10b981; }
.pto-drp { background: #1e293b; border: 1px solid rgba(255,255,255,.1); border-left: 5px solid #f59e0b; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.pto-drp.pri-tinggi { border-left-color: #ef4444; } .pto-drp.pri-rendah { border-left-color: #10b981; }
.pto-drp-top { display: flex; gap: 8px; align-items: center; }
.pto-no { width: 30px; height: 30px; border-radius: 50%; background: #0ea5e9; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.pto-judul { font-weight: 800; font-size: 15px; } .pto-sm { width: auto; flex: none; font-size: 12px; padding: 6px; }
.pto-drugs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; } .pto-drugs span { font-size: 12px; background: rgba(14,165,233,.14); color: #bae6fd; border-radius: 999px; padding: 3px 9px; }
.pto-codes { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr; gap: 10px; margin-top: 6px; }
.pto-codes .pto-code { margin-bottom: 4px; font-size: 12px; padding: 6px; }
.pto-follow { margin-top: 10px; background: rgba(16,185,129,.07); border: 1px dashed rgba(16,185,129,.4); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.pto-follow > b { color: #a7f3d0; }
.pto-refs { margin-top: 8px; font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.pto-refs a { color: #7dd3fc; text-decoration: none; } .pto-refs a:hover { text-decoration: underline; } .pto-refs small { color: #94a3b8; }
.pto-soap { display: grid; grid-template-columns: 34px 1fr; gap: 6px 10px; align-items: start; }
#ptoApp .pto-soap label { font-size: 18px; color: #34d399; margin: 4px 0 0; }
#ptoPrev { background: #0b1220; }
/* animasi detak jantung */
.pto-loader { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding: 14px 18px; border-radius: 16px; border: 1px solid rgba(52,211,153,.35); background: linear-gradient(135deg, rgba(16,185,129,.12), rgba(14,165,233,.12)); }
.pto-pulse { width: 110px; height: 40px; flex: none; }
.pto-pulse svg { width: 100%; height: 100%; overflow: visible; }
.pto-pulse path { fill: none; stroke: #34d399; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 160; stroke-dashoffset: 160; animation: ptobeat 1.6s linear infinite; filter: drop-shadow(0 0 6px #34d399); }
@keyframes ptobeat { to { stroke-dashoffset: -160; } }
.pto-ld { flex: 1; min-width: 0; } .pto-ld-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.pto-ld-top span { color: #d1fae5; font-weight: 700; font-size: 14px; } .pto-ld-top b { font-size: 22px; font-weight: 900; color: #6ee7b7; font-variant-numeric: tabular-nums; }
.pto-ld-bar { height: 10px; border-radius: 10px; background: rgba(148,163,184,.18); overflow: hidden; } .pto-ld-bar i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #10b981, #0ea5e9); transition: width .4s; }
@media (prefers-reduced-motion: reduce) { .pto-pulse path { animation: none; stroke-dashoffset: 0; } }
@media (max-width: 1000px) { .pto-top, .pto-codes { grid-template-columns: 1fr; } .pto-grid, .pto-calc { grid-template-columns: 1fr 1fr; } .pto-half { grid-column: 1 / -1; } .pto-bar { position: static; } }
@media (max-width: 620px) { .pto-grid, .pto-grid2, .pto-calc { grid-template-columns: 1fr; } }

/* ---------- Laporan Kasus (format PKL) ---------- */
.pto-h5 { margin: 14px 0 6px; font-size: 13px; color: #93c5fd; }
.pto-h5 small { color: #94a3b8; font-weight: 500; }
.pto-sub td.pto-ck { text-align: center; }
.pto-sub input[type=checkbox] { width: 18px; height: 18px; accent-color: #10b981; cursor: pointer; }
.pto-sub .pto-sticky .pto-in { min-width: 170px; }
.pto-obat td.pto-jam .pto-in { width: 74px; }
.pto-kultur { border: 1px dashed rgba(255,255,255,.18); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.pto-kasus { border-color: rgba(16,185,129,.45); box-shadow: 0 0 0 1px rgba(16,185,129,.15) inset; }
.pto-btn-k { background: linear-gradient(135deg, #6366f1, #0ea5e9); }
.pto-buku { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.pto-buku label { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: #cbd5e1; cursor: pointer; }
.pto-buku input { margin-top: 2px; accent-color: #10b981; }
.pto-logo { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.pto-logo img { max-height: 54px; max-width: 120px; background: #fff; border-radius: 8px; padding: 3px; }
.pto-kstat { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(16,185,129,.1); color: #a7f3d0; font-size: 13px; }
.pto-kwarn { color: #fcd34d; }
.pto-kprev { margin-top: 12px; background: #fff; border-radius: 12px; padding: 16px; max-height: 80vh; overflow: auto; }
.pto-mt summary { cursor: pointer; }
.pto-sub .pto-sticky { display: flex; align-items: center; gap: 6px; }
.pto-kasus .pto-bar { position: static; }
/* ---------- mode unggah sekali jalan ---------- */
.pto-drop { border: 1px solid rgba(56,189,248,.4); }
.pto-drop.over { box-shadow: 0 0 0 3px rgba(56,189,248,.55); }
.pto-lead { font-size: 13px; color: #cbd5e1; line-height: 1.55; }
.pto-dz { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 12px 0 8px; padding: 22px 12px; border: 2px dashed rgba(56,189,248,.5); border-radius: 14px; background: rgba(56,189,248,.06); cursor: pointer; text-align: center; transition: background .2s; }
.pto-dz:hover, .pto-drop.over .pto-dz { background: rgba(56,189,248,.14); }
.pto-dz b { font-size: 15px; color: #e0f2fe; }
.pto-dz small { color: #94a3b8; font-size: 11.5px; }
.pto-paste summary { cursor: pointer; color: #93c5fd; font-size: 12.5px; margin: 6px 0; }
.pto-ckline { display: flex; gap: 8px; align-items: center; margin: 10px 0 4px; font-size: 13px; color: #e2e8f0; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.pto-ckline input { width: 17px; height: 17px; accent-color: #10b981; }
.pto-block { display: block; margin: 8px auto 0; }
.pto-detail { margin-bottom: 14px; }
.pto-detail > summary { cursor: pointer; padding: 14px 18px; border-radius: 14px; background: #1e293b; border: 1px solid rgba(255,255,255,.1); margin-bottom: 12px; color: #e2e8f0; }
.pto-detail > summary small { color: #94a3b8; }
.pto-dsum { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: rgba(16,185,129,.15); color: #6ee7b7; font-size: 12px; }
.pto-card label.pto-dz { display: flex !important; flex-direction: column; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.pto-card label.pto-dz small { display: block; text-transform: none; font-size: 11.5px; }
#ptoApp label.pto-dz { display: flex; flex-direction: column; align-items: center; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; margin: 12px 0 8px; }
#ptoApp .pto-buku label, #ptoApp label.pto-ckline { display: flex; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12.5px; color: #cbd5e1; margin: 0; }
#ptoApp label.pto-ckline { margin: 10px 0 4px; font-size: 13px; color: #e2e8f0; }
/* ---------- visualisasi ---------- */
.pto-kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.pto-kpi > div { border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-left: 4px solid #38bdf8; display: flex; flex-direction: column; gap: 2px; }
.pto-kpi span { font-size: 11px; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.pto-kpi b { font-size: 26px; color: #f8fafc; line-height: 1.1; }
.pto-kpi small { font-size: 11px; color: #94a3b8; }
.pto-kpi .k-red { border-left-color: #ef4444; } .pto-kpi .k-red b { color: #fca5a5; }
.pto-kpi .k-amber { border-left-color: #f59e0b; } .pto-kpi .k-amber b { color: #fcd34d; }
.pto-kpi .k-green { border-left-color: #22c55e; } .pto-kpi .k-teal { border-left-color: #14b8a6; }
.pto-kpi .k-violet { border-left-color: #8b5cf6; } .pto-kpi .k-violet b { color: #c4b5fd; } .pto-kpi .k-slate { border-left-color: #64748b; }
.pto-figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); gap: 12px; }
.pto-fig { margin: 0; background: #fff; border-radius: 12px; padding: 8px 8px 6px; overflow: hidden; }
.pto-fig.w { grid-column: 1 / -1; }
.pto-fig figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #334155; font-size: 12px; font-weight: 700; padding: 2px 4px 6px; }
.pto-fig figcaption .pto-chip { background: #eef2ff; color: #3730a3; border-color: #c7d2fe; }
.pto-svg { overflow-x: auto; }
.pto-svg svg { display: block; width: 100%; max-width: min(100%, var(--mw, 980px)); height: auto; margin: 0 auto; }
/* ---------- sampul & tema ---------- */
.pto-tema { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 40px; }
.pto-sw { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(255,255,255,.15); cursor: pointer; padding: 0; }
.pto-sw.on { border-color: #fff; box-shadow: 0 0 0 3px rgba(56,189,248,.6) !important; }
.pto-covprev { margin-top: 12px; max-width: 420px; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px -14px rgba(0,0,0,.7); }
.pto-covprev svg { display: block; width: 100%; height: auto; }
