/* ═══ Phân bổ tỉnh + ngân sách vùng trong màn nhập plan (plan-alloc.js, 12/2026) — mọi lớp bắt đầu bằng .pa- ═══ */
@keyframes paIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.ux-chip.pa-btn,.plan-crumb .ux-chip.pa-btn{position:relative}
.ux-chip.pa-btn.pa-hot,.plan-crumb .ux-chip.pa-btn.pa-hot{border-color:#F59E0B;color:#92400E;background:#FFFBEB}
.ux-chip.pa-btn.on,.plan-crumb .ux-chip.pa-btn.on{border-color:#3B82F6;color:#1D4ED8;background:#EFF6FF}
.pa-badge{position:absolute;top:-7px;right:-7px;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#EF4444;color:#fff;font-style:normal;font-size:10px;font-weight:800;line-height:17px;text-align:center;box-shadow:0 0 0 2px #fff}
tr.rv.pa-flash>td{animation:paFlash 1.3s ease-out}
@keyframes paFlash{0%,40%{box-shadow:inset 0 0 0 999px rgba(59,130,246,.22)}100%{box-shadow:none}}
/* ⑤ tỉnh ngoài phân bổ */
input.tinh-sel.pa-out{box-shadow:0 0 0 2px #F59E0B!important;background:#FFFBEB!important;border-radius:4px}
/* ② bảng ngân sách vùng */
.pa-pop{position:fixed;z-index:9000;width:min(620px,calc(100vw - 24px));max-height:min(72vh,640px);display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.28),0 0 0 1px rgba(15,23,42,.06);font-family:'Be Vietnam Pro',-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#1D1D1F;font-size:13px;animation:paIn .2s cubic-bezier(.2,.8,.2,1)}
.pa-pop.pa-sheet{left:0;right:0!important;bottom:0;top:auto!important;width:100%;max-height:82vh;border-radius:18px 18px 0 0;padding-bottom:env(safe-area-inset-bottom)}
.pa-h{display:flex;align-items:center;gap:8px;padding:12px 14px 12px 16px;border-bottom:1px solid #E5E7EB;flex-wrap:wrap}
.pa-h b{font-size:14px}.pa-h small{color:#64748B;font-size:12px;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pa-sp{flex:1}
.pa-seg{display:inline-flex;background:#F1F5F9;border-radius:8px;padding:3px;max-width:100%;overflow-x:auto}
.pa-seg button{border:0;background:none;padding:4px 10px;border-radius:6px;font-size:12px;font-weight:700;color:#64748B;cursor:pointer;white-space:nowrap;font-family:inherit}
.pa-seg button.on{background:#fff;color:#0F172A;box-shadow:0 1px 2px rgba(0,0,0,.14)}
.pa-close{width:28px;height:28px;border:0;border-radius:50%;background:#F1F5F9;color:#64748B;cursor:pointer;font-size:11px}
.pa-list{overflow:auto;flex:1}
.pa-row{display:grid;grid-template-columns:150px minmax(0,1fr) 112px;gap:6px 12px;align-items:center;width:100%;padding:10px 16px;border:0;border-bottom:1px solid #F1F5F9;background:#fff;text-align:left;cursor:pointer;font-family:inherit;color:inherit;transition:background .15s}
.pa-row:hover{background:#F8FAFC}
.pa-row.me{background:#EFF6FF;box-shadow:inset 3px 0 0 #1D4ED8}
.pa-row.pa-flash{animation:paFlash 1.3s ease-out}
.pa-v b{display:block;font-size:13px}.pa-v small{display:block;color:#1D4ED8;font-size:11px;font-weight:700}
.pa-l{display:flex;justify-content:space-between;gap:8px;font-size:12px;color:#475569}
.pa-ok{color:#15803D}.pa-bad{color:#B91C1C}.pa-mut{color:#94A3B8}
.pa-bar{height:7px;border-radius:7px;background:#E5E7EB;overflow:hidden;margin-top:4px}
.pa-bar i{display:block;height:100%;border-radius:7px;background:#22C55E;transition:width .4s cubic-bezier(.2,.8,.2,1)}
.pa-bar i.w{background:#F59E0B}.pa-bar i.o{background:#EF4444}
.pa-amt{text-align:right;font-variant-numeric:tabular-nums}.pa-amt b{display:block;font-size:13px}.pa-amt small{color:#94A3B8;font-size:11px}
.pa-tinh{grid-column:1/-1}
.pa-f{display:flex;justify-content:space-between;gap:10px;padding:10px 16px;background:#F8FAFC;font-weight:800;border-top:1px solid #E5E7EB;font-variant-numeric:tabular-nums}
.pa-hint{padding:0 16px 10px;background:#F8FAFC;color:#94A3B8;font-size:11.5px;border-radius:0 0 14px 14px}
@media(max-width:640px){.pa-row{grid-template-columns:1fr 104px}.pa-mid{grid-column:1/-1;order:3}}
@media(prefers-reduced-motion:reduce){.pa-pop,tr.rv.pa-flash>td,.pa-row.pa-flash{animation:none}}
/* tỉnh phân bổ dạng thẻ (bảng ②) */
.pa-tinh{display:flex;flex-direction:column;gap:5px;background:none!important;padding:0!important}
.pa-tl{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.pa-tag{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#FFF7E6;border:1px solid #FCD79B;color:#92400E;font-size:11.5px;font-weight:700;white-space:nowrap}
.pa-th{font-style:normal;font-size:11px;font-weight:800;color:#64748B;margin-right:2px}
.pa-rest{font-size:12px;color:#64748B;font-style:italic}
/* ⑥ lưới chọn tỉnh trong ô Ghi chú phân bổ */
.pa-pick{margin-bottom:8px}
.pa-pick-h{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11.5px;font-weight:700;color:#475569;margin-bottom:6px}
.pa-pick-h button{border:0;background:none;color:#1D4ED8;font-weight:700;font-size:11.5px;cursor:pointer;padding:2px 4px;font-family:inherit}
.pa-pick-g{display:flex;flex-wrap:wrap;gap:5px;max-height:168px;overflow:auto}
.pa-pt{height:28px;padding:0 10px;border:1.5px solid #E1E7EF;border-radius:999px;background:#fff;color:#334155;font-size:12px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .12s,border-color .12s,color .12s,transform .12s}
.pa-pt:hover{border-color:#93C5FD;background:#F8FAFF}
.pa-pt.on{background:#EFF6FF;border-color:#3B82F6;color:#1D4ED8}
.pa-pt:active{transform:scale(.95)}
.pa-pick-x{margin-top:6px;font-size:11.5px;color:#B45309}
/* thứ tự ưu tiên (12/2026) */
.pa-tag b{display:inline-grid;place-items:center;min-width:16px;height:16px;margin:0 5px 0 -5px;padding:0 3px;border-radius:999px;background:#F59E0B;color:#fff;font-size:10px;font-weight:800}
.pa-pt b{display:inline-grid;place-items:center;min-width:18px;height:18px;margin:0 6px 0 -4px;padding:0 4px;border-radius:999px;background:#1D4ED8;color:#fff;font-size:10.5px;font-weight:800}
.pa-pick-h small{display:block;font-weight:500;color:#94A3B8;font-size:11px;margin-top:1px}
