/* =========================================================
   Vox Wear — Mockup de Camisetas
   Tokens, layout do editor e folha de impressão (A4)
   ========================================================= */
:root {
  --ink: #101828; --accent: #3355ff; --accent-soft: #e8ecff;
  --surface: #ffffff; --bg: #f3f4f8; --line: #e2e5ee; --muted: #667085;
  --stage-dot: #cfd4e2;
}
[data-bs-theme="dark"] {
  --ink: #eef0f6; --accent: #8ea2ff; --accent-soft: #232a4d;
  --surface: #171a24; --bg: #0e1017; --line: #2a2f3d; --muted: #98a0b3;
  --stage-dot: #2a2f3d;
}
body { font-family: "Manrope", system-ui, sans-serif; background: var(--bg); color: var(--ink); }

/* ---------- Barra superior ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .65rem 1.25rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.marca { display: flex; align-items: center; gap: .65rem; font-weight: 800; letter-spacing: -.01em; }
.marca small { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: 0; }
.logo { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.btn { font-weight: 600; border-radius: .6rem; }
.btn-primary { --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent); --bs-btn-hover-bg: #2641d6; --bs-btn-hover-border-color: #2641d6; --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Painel ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.1rem; margin-bottom: .9rem; }
.panel h6 { display: flex; align-items: center; gap: .6rem; font-weight: 800; margin-bottom: 1rem; }
.passo { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: .75rem; }
.panel .form-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .4rem; }
.form-control, .form-select, .input-group-text { border-radius: .6rem; border-color: var(--line); }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); padding: 0; box-shadow: inset 0 0 0 2px var(--surface); transition: transform .15s; }
.swatch:hover { transform: scale(1.1); }
.swatch.active { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-control-color { width: 32px; height: 32px; padding: 0; border-radius: 50%; }
.tamanhos { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; }
.tamanhos .btn { padding: .4rem 0; border: 1px solid var(--line); color: var(--ink); background: transparent; }
.tamanhos .btn.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.dica { font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: .6rem; padding: .55rem .7rem; }

/* ---------- Palco do mockup ---------- */
.stage { position: relative; min-height: 78vh; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface) radial-gradient(var(--stage-dot) 1px, transparent 1px) 0 0 / 18px 18px; display: flex; flex-direction: column; align-items: center; padding: 1rem; overflow: auto; }
.segmento { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: .8rem; padding: .25rem; gap: .25rem; margin-bottom: 1rem; }
.segmento .btn { border: 0; padding: .45rem 1.4rem; color: var(--muted); }
.segmento .btn.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(16,24,40,.15); }
.canvas-container { border-radius: 1rem; overflow: hidden; box-shadow: 0 12px 32px rgba(16,24,40,.14); }
.legenda { margin-top: 1rem; font-size: .82rem; color: var(--muted); text-align: center; }
.legenda b { color: var(--ink); }

/* ---------- Ficha técnica (folha A4) ---------- */
.folha-a4 { --f-ink: #14171f; --f-line: #d5d9e3; width: 210mm; min-height: 295mm; box-sizing: border-box; margin: 0 auto; padding: 12mm; background: #fff; color: var(--f-ink); font: 9.5pt/1.4 "Manrope", system-ui, sans-serif; display: flex; flex-direction: column; box-shadow: 0 4px 24px rgba(0,0,0,.25); }
.f-cab { display: flex; justify-content: space-between; align-items: center; padding-bottom: 5mm; border-bottom: 2.5px solid var(--f-ink); }
.f-marca { display: flex; align-items: center; gap: 3mm; }
.f-logo { width: 12mm; height: 12mm; border-radius: 3mm; background: #14171f; color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 11pt; }
.f-marca strong { display: block; font-size: 13pt; line-height: 1.1; }
.f-marca small, .f-titulo small { display: block; color: #5b6275; font-size: 8pt; }
.f-titulo { text-align: right; font-weight: 800; font-size: 14pt; }
.f-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3mm; margin: 5mm 0; }
.f-info div { border: 1px solid var(--f-line); border-radius: 2mm; padding: 2mm 3mm; }
.f-info small { display: block; color: #5b6275; font-size: 7.5pt; }
.f-info b { font-size: 10pt; }
.f-mocks { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; margin-bottom: 5mm; }
.f-mocks figure { margin: 0; text-align: center; }
.f-mocks img { width: 100%; border: 1px solid var(--f-line); border-radius: 2mm; display: block; }
.f-mocks figcaption { font-size: 8.5pt; font-weight: 700; margin-top: 1.5mm; }
.folha-a4 h3 { font-size: 10pt; font-weight: 800; margin: 0 0 2mm; }
.folha-a4 table { width: 100%; border-collapse: collapse; margin-bottom: 5mm; font-size: 8.5pt; }
.folha-a4 th, .folha-a4 td { border-bottom: 1px solid var(--f-line); padding: 1.6mm 2mm; text-align: left; vertical-align: top; }
.folha-a4 th { background: #f0f2f7; font-weight: 700; }
.folha-a4 tr.destaque td { font-weight: 800; background: #eaeeff; }
.f-rodape { margin-top: auto; border-top: 1px solid var(--f-line); padding-top: 3mm; display: flex; justify-content: space-between; gap: 6mm; font-size: 8pt; color: #4a5163; }
.f-rodape strong { color: var(--f-ink); }
.f-rodape .f-nota { max-width: 80mm; text-align: right; }

/* ---------- Impressão: apenas a ficha, em uma única folha ---------- */
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; height: auto !important; overflow: visible !important; }
  body > *:not(#modalFicha) { display: none !important; }       /* some o editor inteiro (sem ocupar espaço) */
  .modal-backdrop, .no-print { display: none !important; }
  #modalFicha, #modalFicha .modal-dialog, #modalFicha .modal-content, #modalFicha .modal-body {
    position: static !important; display: block !important; transform: none !important; width: auto !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: visible !important; background: #fff !important; height: auto !important; }
  .folha-a4 { box-shadow: none; margin: 0; width: 210mm; min-height: 0; height: 296mm; overflow: hidden; break-inside: avoid; page-break-after: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Tamanhos adulto / infantil ---------- */
.grupo-rot { font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: .7rem 0 .35rem; }
.grupo-rot:first-child { margin-top: 0; }
.tamanhos.infantil { grid-template-columns: repeat(4, 1fr); }
