/* ============================================================
   CANTIERI — Modo DTF (aba "DTF")
   Escopado em .dtf. Palco com preview sobre a cor da peça +
   painel com os 4 grupos do pipeline.
============================================================ */
.dtf { height:100%; }
.dtf .dtf-wrap { display:flex; gap:16px; height:100%; min-height:540px; }

/* ---- palco ---- */
.dtf .dtf-stage-wrap { flex:1; display:flex; flex-direction:column; min-width:0; }
.dtf .dtf-stage {
  flex:1; position:relative; display:flex; align-items:center; justify-content:center;
  background:var(--bg); border:1px solid var(--line-soft); border-radius:12px; overflow:hidden; min-height:0;
  background-image:radial-gradient(circle at 1px 1px, rgba(240,237,230,.04) 1px, transparent 0); background-size:22px 22px;
}
.dtf #dtfView { max-width:calc(100% - 36px); max-height:calc(100% - 36px); border-radius:4px;
  box-shadow:0 0 0 1px var(--line), 0 24px 50px -20px rgba(0,0,0,.8); }
.dtf .dtf-drop {
  position:absolute; inset:18px; border:1.5px dashed var(--line); border-radius:10px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; text-align:center;
  color:var(--text-dim); padding:24px;
}
.dtf .dtf-drop.drag { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); }
.dtf .dtf-drop svg { opacity:.45; }
.dtf .dtf-drop b { color:var(--text); font-weight:600; font-size:15px; }
.dtf .dtf-drop small { color:var(--text-faint); font-family:var(--mono); font-size:11px; }
.dtf .dtf-badge {
  position:absolute; left:16px; top:14px; font-family:var(--mono); font-size:10.5px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--text-faint); background:rgba(20,20,20,.7); backdrop-filter:blur(8px);
  padding:5px 9px; border-radius:6px; border:1px solid var(--line-soft);
}
.dtf .dtf-proc {
  position:absolute; right:16px; top:14px; font-family:var(--mono); font-size:10.5px; color:var(--accent);
  background:var(--accent-soft); border:1px solid var(--accent-line); padding:5px 10px; border-radius:6px;
}
.dtf .dtf-proc.dtf-proc-err { color:#e05252; background:rgba(224,82,82,.13); border-color:rgba(224,82,82,.35); }

/* ---- painel ---- */
.dtf .dtf-panel { width:330px; flex-shrink:0; background:var(--ink); border:1px solid var(--line-soft);
  border-radius:12px; display:flex; flex-direction:column; overflow:hidden; }
.dtf .dtf-head { padding:15px 18px; border-bottom:1px solid var(--line-soft); display:flex; align-items:center; gap:10px; }
.dtf .dtf-head-ico { width:30px; height:30px; border-radius:8px; background:var(--accent-soft); border:1px solid var(--accent-line);
  display:flex; align-items:center; justify-content:center; color:var(--accent); flex-shrink:0; }
.dtf .dtf-head-t { font-size:13.5px; font-weight:600; }
.dtf .dtf-head-s { font-size:11px; color:var(--text-faint); font-family:var(--mono); }
.dtf .dtf-body { flex:1; overflow-y:auto; }
.dtf .dtf-body::-webkit-scrollbar { width:10px; }
.dtf .dtf-body::-webkit-scrollbar-thumb { background:var(--line); border-radius:5px; border:3px solid var(--ink); }

/* ---- grupos ---- */
.dtf .dtf-group { padding:14px 18px; border-bottom:1px solid var(--line-soft); }
.dtf .dtf-group:last-child { border-bottom:none; }
.dtf .dtf-ghead { display:flex; align-items:center; justify-content:space-between; margin-bottom:13px; }
.dtf .dtf-gh-left { display:flex; align-items:center; gap:10px; }
.dtf .dtf-ghead h2 { font-family:var(--mono); font-size:10px; letter-spacing:.13em; text-transform:uppercase;
  color:var(--text-faint); margin:0; font-weight:500; }
.dtf .dtf-group.off .dtf-gbody { opacity:.35; pointer-events:none; }
.dtf .dtf-reset, .dtf .dtf-reset-one { background:none; border:1px solid var(--line); color:var(--text-faint);
  cursor:pointer; border-radius:5px; font-size:11px; line-height:1; padding:3px 6px; transition:.14s; }
.dtf .dtf-reset:hover, .dtf .dtf-reset-one:hover { color:var(--accent); border-color:var(--accent-line); }
.dtf .dtf-reset-one { border:none; padding:0 2px; font-size:12px; }

/* ---- controles ---- */
.dtf .dtf-ctrl { margin-bottom:13px; }
.dtf .dtf-ctrl:last-child { margin-bottom:0; }
.dtf .dtf-ctrl-lbl { display:flex; align-items:baseline; gap:7px; margin-bottom:8px; font-size:12.5px; color:var(--text); }
.dtf .dtf-ctrl-lbl > span:first-child { flex:1; }
.dtf .dtf-ctrl-lbl .val { font-family:var(--mono); font-size:11px; color:var(--accent); }
.dtf input[type=range] { -webkit-appearance:none; appearance:none; width:100%; height:4px; border-radius:2px;
  background:var(--surface-3); outline:none; cursor:pointer; }
.dtf input[type=range]::-webkit-slider-thumb { -webkit-appearance:none; width:14px; height:14px; border-radius:50%;
  background:var(--cream); border:3px solid var(--ink); box-shadow:0 0 0 1px var(--line); cursor:pointer; }
.dtf input[type=range]::-webkit-slider-thumb:hover { background:var(--accent); }

.dtf .dtf-seg { display:flex; gap:3px; background:var(--surface-2); padding:3px; border-radius:9px; }
.dtf .dtf-seg button { flex:1; background:none; border:none; color:var(--text-dim); font-family:var(--mono); font-size:11px;
  padding:7px 4px; cursor:pointer; border-radius:6px; transition:.12s; }
.dtf .dtf-seg button.on { background:var(--accent); color:var(--ink); font-weight:600; }
.dtf .dtf-seg button:hover:not(.on) { color:var(--text); }

.dtf .dtf-toggle { display:flex; align-items:center; justify-content:space-between; font-size:12.5px; }
.dtf .dtf-switch { position:relative; width:38px; height:22px; flex-shrink:0; display:inline-block; }
.dtf .dtf-switch input { opacity:0; width:0; height:0; position:absolute; }
.dtf .dtf-sw { position:absolute; inset:0; background:var(--surface-3); cursor:pointer; transition:.15s; border-radius:11px; border:1px solid var(--line); }
.dtf .dtf-sw:before { content:""; position:absolute; width:16px; height:16px; left:2px; top:2px; background:var(--text-faint); transition:.15s; border-radius:50%; }
.dtf .dtf-switch input:checked + .dtf-sw { background:var(--accent-soft); border-color:var(--accent-line); }
.dtf .dtf-switch input:checked + .dtf-sw:before { transform:translateX(16px); background:var(--accent); }

.dtf .dtf-swatch-row { display:flex; align-items:center; gap:11px; }
.dtf .dtf-swatch { position:relative; width:38px; height:38px; border-radius:9px; border:1px solid var(--line); cursor:pointer; overflow:hidden; flex-shrink:0; }
.dtf .dtf-swatch input[type=color] { position:absolute; inset:-4px; width:calc(100% + 8px); height:calc(100% + 8px); border:none; padding:0; background:none; cursor:pointer; }
.dtf .dtf-sw-info { flex:1; min-width:0; }
.dtf .dtf-sw-name { font-size:12.5px; font-weight:500; }
.dtf .dtf-sw-hex { font-family:var(--mono); font-size:10.5px; color:var(--text-faint); margin-top:1px; }

.dtf .btn.dtf-fullw { width:100%; }
.dtf .btn.dtf-mini { padding:7px 10px; font-size:11px; flex-shrink:0; }
.dtf .dtf-btn-row { display:flex; gap:8px; }
.dtf .dtf-btn-row .btn { flex:1; }
.dtf .dtf-sub { font-size:11px; color:var(--text-faint); line-height:1.5; margin-top:10px; }

@media (max-width:900px) {
  .dtf .dtf-wrap { flex-direction:column; height:auto; }
  .dtf .dtf-panel { width:100%; }
  .dtf .dtf-stage { min-height:360px; }
}
