/* HVSC Apps - giao diện chung cho công cụ ảnh/video (kéo thả, bảng điều khiển, lưới ảnh). */
.tw{padding-top:14px}
.dz{border:2px dashed color-mix(in srgb,var(--navy) 30%,var(--line));border-radius:18px;background:var(--card);padding:26px 18px;text-align:center;cursor:pointer;transition:border-color .15s,background .15s;display:flex;flex-direction:column;align-items:center;gap:8px;min-height:120px;justify-content:center}
.dz:hover,.dz.over,.dz:focus-visible{border-color:var(--orange);background:color-mix(in srgb,var(--orange) 7%,var(--card))}
.dz .ico{width:36px;height:36px;color:var(--orange)}
.dz b{font-size:17px}.dz small{color:var(--muted)}
.dz.mini{min-height:0;padding:12px;flex-direction:row;justify-content:center}.dz.mini .ico{width:22px;height:22px}
.msg{font-size:13.5px;color:var(--muted);min-height:20px;margin:6px 0}.msg.err{color:var(--bad)}.msg.ok{color:var(--ok)}
.ws{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:16px;align-items:start;margin-top:14px}
@media(max-width:900px){.ws{grid-template-columns:1fr}}
.pv{display:flex;flex-direction:column;gap:10px}
.pvbox{position:relative;background:repeating-conic-gradient(var(--soft) 0% 25%,var(--card) 0% 50%) 0 0/20px 20px;border:1px solid var(--line);border-radius:14px;min-height:260px;display:grid;place-items:center;overflow:hidden;touch-action:none}
.pvbox img,.pvbox canvas{max-width:100%;max-height:62vh;display:block;user-select:none;-webkit-user-drag:none}
.pvbox .busy{position:absolute;right:10px;top:10px;font-size:12px;background:var(--navy);color:#fff;padding:3px 10px;border-radius:999px;opacity:0;transition:opacity .15s}.pvbox.loading .busy{opacity:1}
.panel{display:flex;flex-direction:column;gap:12px}
.panel .card{padding:14px 16px}
.panel h3{margin:0 0 10px;font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}
.fld{display:flex;flex-direction:column;gap:5px;margin:8px 0;font-size:14px;font-weight:600}
.fld input[type=text],.fld input[type=number],.fld select,.fld textarea{width:100%;font-weight:400}
.fld input[type=range]{width:100%;min-height:32px;accent-color:var(--red)}
.fld .v{font-weight:400;color:var(--muted);float:right}
.fld input[type=color]{width:100%;min-height:44px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chk{display:flex;gap:10px;align-items:center;min-height:36px;font-size:15px;font-weight:500}.chk input{width:20px;height:20px;accent-color:var(--red)}
.sg{display:flex;gap:3px;background:var(--soft);border:1px solid var(--line);border-radius:12px;padding:3px}
.sg button{flex:1;border:0;background:transparent;min-height:40px;border-radius:9px;font-weight:600;cursor:pointer;color:var(--muted);font-size:14px}
.sg button.on{background:var(--navy);color:#fff}:root[data-theme=dark] .sg button.on{background:var(--red)}
.pos{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;width:150px}
.pos button{aspect-ratio:1.4;min-height:36px;border:1px solid var(--line);background:var(--soft);border-radius:8px;cursor:pointer}.pos button.on{background:var(--orange);border-color:var(--orange)}
.thumbs{display:flex;gap:8px;overflow-x:auto;padding:4px 2px 8px;scrollbar-width:thin}
.th{flex:none;width:84px;height:84px;border-radius:12px;border:2px solid transparent;overflow:hidden;position:relative;cursor:pointer;background:var(--soft);padding:0}
.th img{width:100%;height:100%;object-fit:cover;display:block}.th.on{border-color:var(--orange)}
.th .x{position:absolute;right:2px;top:2px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(0,0,0,.6);color:#fff;font-size:13px;line-height:1;cursor:pointer}
.th .st{position:absolute;left:3px;bottom:3px;font-size:10px;font-weight:700;background:var(--ok);color:#fff;padding:0 5px;border-radius:5px}
.prog{height:8px;background:var(--line);border-radius:8px;overflow:hidden}.prog i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--orange),var(--red));transition:width .2s}
.rt{width:100%;border-collapse:collapse;font-size:14px}.rt th,.rt td{padding:8px 10px;text-align:left;border-bottom:1px solid var(--line)}.rt th{font-size:12px;text-transform:uppercase;color:var(--muted)}
.rt img{width:44px;height:44px;object-fit:cover;border-radius:8px;vertical-align:middle}
.tblw{overflow-x:auto}
.good{color:var(--ok);font-weight:700}.warnt{color:var(--bad)}
.act{display:flex;gap:8px;flex-wrap:wrap}
.pvbtn{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:560px){.panel .card{padding:12px}.pos{width:132px}}

.ws>*,.qg>*,.cg>*,.ag>*{min-width:0}
