/* ═══════════════════════════════════════════════════════════════════════
   Luni Baby Kids — painel  ·  boutique: marfim quente, berinjela, rosé e dourado
   ═══════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #f7f2ec; --surface: #fffdfa; --surface-2: #f4ede5; --surface-3: #efe6dc;
  --ink: #241b27; --ink-2: #5b5060; --mute: #8f8492;
  --line: #ebe2d7; --line-2: #ddd1c3;
  --plum: #2a1d2e; --plum-2: #3a2a3f;
  --rose: #a85a6f; --rose-2: #f5e6e9; --rose-ink: #84405a;
  --gold: #b8935f; --gold-2: #f3ead9;
  --sage: #557c66; --sage-2: #e4efe7; --sky: #4c7597; --sky-2: #e3ecf4;
  --honey: #9a6b17; --honey-2: #f7ebd0; --coral: #b5503b; --coral-2: #f9e3dc; --lilac: #735d9e; --lilac-2: #ece6f5;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 0 rgba(36,27,39,.03), 0 14px 34px -18px rgba(36,27,39,.22);
  --shadow-lift: 0 1px 0 rgba(36,27,39,.03), 0 22px 44px -20px rgba(36,27,39,.32);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Manrope', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--rose-ink); text-decoration-color: rgba(132,64,90,.35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.015em; margin: 0; }
h1 { font-size: 34px; line-height: 1.1; } h2 { font-size: 20px; } h3 { font-size: 15px; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.hidden { display: none !important; }
.mute { color: var(--mute); } .small { font-size: 12.5px; } .mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12px; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; } .right { text-align: right; } .grow { flex: 1; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: #fff; color: var(--ink); border-right: 1px solid #eee4e8; box-shadow: 4px 0 24px -18px rgba(58,36,56,.35); padding: 26px 16px 18px; position: sticky; top: 0; height: 100vh;
        display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 10px 28px; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #f2dfe4, #c98b9b 70%); display: grid; place-items: center;
              font-family: var(--serif); font-weight: 600; color: var(--plum); font-size: 19px; box-shadow: 0 0 0 1px rgba(184,147,95,.6), 0 0 0 5px rgba(184,147,95,.12); }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.1; color: #fff; }
.brand-sub { font-size: 10px; color: var(--gold); letter-spacing: .2em; text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: #fbf3f5; color: var(--plum); }
.nav a.on { background: #f8e9ed; color: var(--rose); box-shadow: inset 3px 0 0 var(--rose); }
.nav a.primary-link { margin: 6px 0 10px; background: var(--rose); color: #fff; justify-content: center; box-shadow: 0 10px 22px -12px rgba(168,90,111,.9); }
.nav a.primary-link:hover { background: #b7677d; }
.nav a.primary-link.on { box-shadow: 0 0 0 2px var(--gold); }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid #eee4e8; }
.side-foot .who { font-weight: 700; color: var(--plum); } .side-foot .role { font-size: 12px; color: var(--gold); margin-bottom: 8px; }
.side-foot a, .linkbtn { color: var(--ink-2); font-size: 12.5px; }
.linkbtn { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
main.content { padding: 36px 44px 72px; max-width: 1380px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 760px; }
.page-head > div > a.small:first-child { display: inline-block; margin-bottom: 6px; }
.mobile-bar { display: none; }

/* Abas de cada área */
.tabs { display: flex; gap: 4px; margin: -6px 0 26px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 16px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--rose-ink); border-bottom-color: var(--rose); }

/* ── Componentes ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); padding: 9px 18px; border-radius: 999px;
       cursor: pointer; font-weight: 700; font-size: 13.5px; text-decoration: none; color: var(--ink); white-space: nowrap; transition: all .15s; }
.btn:hover { border-color: var(--ink-2); box-shadow: 0 6px 14px -10px rgba(36,27,39,.5); }
.btn.primary { background: var(--plum); border-color: var(--plum); color: #fff; }
.btn.primary:hover { background: var(--plum-2); }
.btn.rose { background: var(--rose); border-color: var(--rose); color: #fff; box-shadow: 0 10px 22px -14px rgba(168,90,111,.9); }
.btn.rose:hover { background: var(--rose-ink); }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.danger { color: var(--coral); }
.btn.sm { padding: 6px 13px; font-size: 12.5px; }
.btn.big { padding: 15px 22px; font-size: 16px; }
.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=date], input[type=tel], select, textarea {
  width: 100%; padding: 10px 13px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 4px var(--rose-2); }
input:disabled, select:disabled { background: var(--surface-2); color: var(--ink-2); }
textarea { min-height: 90px; resize: vertical; }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: .01em; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.chip.rosa { background: var(--rose-2); color: var(--rose-ink); } .chip.salvia { background: var(--sage-2); color: var(--sage); }
.chip.azul { background: var(--sky-2); color: var(--sky); } .chip.mel { background: var(--honey-2); color: var(--honey); }
.chip.coral { background: var(--coral-2); color: var(--coral); } .chip.lilas { background: var(--lilac-2); color: var(--lilac); }
.chip.ouro { background: var(--gold-2); color: #8a6a3c; }
.chip.toggle { cursor: pointer; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); padding: 6px 13px; font-size: 12.5px; text-decoration: none; }
.chip.toggle:hover { border-color: var(--ink-2); }
.chip.toggle.on { border-color: transparent; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }
.empty { padding: 44px; text-align: center; color: var(--mute); }
.notice { padding: 14px 16px; border-radius: 14px; background: var(--honey-2); color: #6a4a0f; font-size: 13.5px; border: 1px solid #efdcae; }
.notice.info { background: var(--sky-2); color: #2c516f; border-color: #cddcea; }
.notice.spaced { margin-bottom: 20px; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.t td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tbody tr:hover td { background: rgba(244,237,229,.45); }
table.t tr:last-child td { border-bottom: 0; }
table.t tfoot td { border-top: 1px solid var(--line-2); font-weight: 600; }
table.t input, table.t select { padding: 7px 9px; font-size: 13px; border-radius: 9px; }
table.t td.right { white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ── KPIs ───────────────────────────────────────────────────────────── */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.kpi .lbl { font-size: 11px; color: var(--mute); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.kpi .val { font-family: var(--serif); font-size: 30px; font-weight: 500; margin-top: 6px; line-height: 1.1; letter-spacing: -.02em; }
.kpi .sub { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; }
.kpi.alert .val { color: var(--coral); }
.kpi.on { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-2); }
a.kpi { text-decoration: none; color: inherit; } a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 60px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row.rank { grid-template-columns: minmax(0, 1.3fr) 1fr auto; }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #c98b9b, var(--rose)); border-radius: 99px; }
.bar-fill.neg { background: var(--coral); }
h2.sec { font-size: 11px; font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; color: var(--gold); font-weight: 700; margin: 8px 0 12px; }

/* ── Início ─────────────────────────────────────────────────────────── */
.welcome { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-bottom: 26px; }
.hero-card { background: radial-gradient(120% 140% at 0% 0%, #3d2a43 0%, var(--plum) 55%, #1c1420 100%); color: #f3eaf0; border-radius: 22px; padding: 30px 32px; position: relative; overflow: hidden; box-shadow: var(--shadow-lift); }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%; border: 1px solid rgba(184,147,95,.35); }
.hero-card::before { content: ''; position: absolute; right: -10px; top: 40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(201,139,155,.35), transparent 70%); }
.hero-card .eyebrow { color: var(--gold); }
.hero-card h1 { color: #fff; font-size: 36px; margin: 8px 0 6px; }
.hero-card p { color: rgba(243,234,240,.75); margin: 0 0 22px; }
.hero-card .row .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.hero-card .row .btn:hover { background: rgba(255,255,255,.18); }
.hero-card .row .btn.rose { background: var(--rose); border-color: var(--rose); }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-stats .kpi { margin: 0; }
.todo { display: flex; flex-direction: column; }
.todo-item { display: grid; grid-template-columns: 38px 1fr auto; gap: 14px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: 0; }
.todo-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--rose-2); color: var(--rose-ink); }
.todo-ic.mel { background: var(--honey-2); color: var(--honey); } .todo-ic.coral { background: var(--coral-2); color: var(--coral); }
.todo-ic.azul { background: var(--sky-2); color: var(--sky); } .todo-ic.salvia { background: var(--sage-2); color: var(--sage); }
.todo-item strong { display: block; }
.all-good { display: flex; gap: 12px; align-items: center; color: var(--sage); font-weight: 700; padding: 10px 0; }

/* ── Filtros + grade de produtos ───────────────────────────────────── */
.filters { display: grid; grid-template-columns: 2fr repeat(3, minmax(0, 1fr)) auto; gap: 12px; margin-bottom: 20px; align-items: end; }
.filters.more-open { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)) auto; }
.filters .extra { display: contents; }
.filters:not(.more-open) .extra > * { display: none; }
.filters-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.presets { grid-column: 1 / -1; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
         transition: transform .18s, box-shadow .18s; box-shadow: var(--shadow); }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.pcard .ph { aspect-ratio: 4/5; background: #fff; display: grid; place-items: center; position: relative; border-bottom: 1px solid var(--line); }
.pcard .ph img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pcard .ph .noph { color: var(--mute); font-size: 12.5px; }
.pcard .flags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.pcard .bd { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard .brandline { font-size: 10.5px; color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.pcard .name { font-family: var(--serif); font-size: 16px; line-height: 1.25; }
.pcard .meta { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; color: var(--ink-2); margin-top: auto; padding-top: 10px; }
.pager { display: flex; justify-content: center; gap: 10px; align-items: center; margin-top: 26px; }

/* ── Detalhe do produto ────────────────────────────────────────────── */
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.detail > aside { position: sticky; top: 20px; }
[data-tab-panel]:not(.on) { display: none !important; }
.checklist { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; }
.checklist .mk { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: none; margin-top: 1px; font-weight: 700; }
.checklist .ok .mk { background: var(--sage-2); color: var(--sage); }
.checklist .no .mk { background: var(--coral-2); color: var(--coral); }
.checklist .opt .mk { background: var(--honey-2); color: var(--honey); }
.review-box { white-space: pre-line; font-size: 13px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; color: var(--ink-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.gimg { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.gimg.main { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-2); }
.gimg .thumb { aspect-ratio: 1; display: grid; place-items: center; cursor: zoom-in; background: #fff; border: 0; padding: 6px; width: 100%; }
.gimg .thumb img { width: 100%; height: 100%; object-fit: contain; }
.gimg .ctl { display: flex; gap: 2px; justify-content: space-between; padding: 6px; border-top: 1px solid var(--line); background: var(--surface-2); }
.gimg .cap { padding: 6px 8px 0; font-size: 11.5px; color: var(--ink-2); display: flex; gap: 4px; flex-wrap: wrap; }
.icon-btn { border: 0; background: transparent; padding: 5px 8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn.danger:hover { color: var(--coral); }
.drop { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 18px; text-align: center; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; min-height: 150px; }
.drop:hover, .drop.over { border-color: var(--rose); background: var(--rose-2); }
.margin-pos { color: var(--sage); font-weight: 700; } .margin-neg { color: var(--coral); font-weight: 700; }
.mv-in { color: var(--sage); font-weight: 700; } .mv-out { color: var(--coral); font-weight: 700; }
#vtable input[name=color], #vtable input[name=size] { min-width: 110px; }
#vtable input[name=sku], #vtable input[name=barcode], #vtable input[name=supplier_ref] { min-width: 132px; }
#vtable input[name=price] { min-width: 100px; }
#vtable input.num-sm { min-width: 64px; width: 72px; }
a.row { text-decoration: none; color: inherit; }

/* ── Vender ────────────────────────────────────────────────────────── */
.pos { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); gap: 22px; align-items: start; }
.pos-cart { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.big-input { font-size: 18px !important; padding: 16px 20px !important; border-radius: 16px !important; }
.results { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; max-height: 68vh; overflow-y: auto; }
.result { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 14px; padding: 10px 12px; cursor: pointer; transition: all .15s; }
.result:hover { border-color: var(--rose); background: var(--rose-2); transform: translateX(2px); }
.result.off { opacity: .45; cursor: not-allowed; transform: none; }
.rthumb { width: 58px; height: 58px; border-radius: 12px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.rthumb img { width: 100%; height: 100%; object-fit: contain; }
.rbody, .rprice { display: flex; flex-direction: column; gap: 1px; }
.rprice { text-align: right; }
.rprice strong { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.cart-title { margin-top: 4px; }
.line { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; background: #fff; }
.line.warn { border-color: #e7b8aa; background: var(--coral-2); }
.lhead { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.lrow { display: grid; grid-template-columns: 70px 120px 1fr auto; gap: 10px; align-items: end; }
.lref { display: flex; flex-direction: column; color: var(--ink-2); }
.ltotal { display: flex; flex-direction: column; text-align: right; }
.totals { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.totals > div { display: flex; justify-content: space-between; }
.totals .grand { font-family: var(--serif); font-size: 26px; font-weight: 500; padding-top: 4px; }
.customer summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); padding: 4px 0; }
tr.cancelled td { color: var(--mute); text-decoration: line-through; }
tr.cancelled td:last-child { text-decoration: none; }
.vp-input { margin-bottom: 6px; }
.vp-list { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; }
.vp-item { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 11px; padding: 9px 12px; cursor: pointer; }
.vp-item:hover { border-color: var(--rose); background: var(--rose-2); }
.cost-row { margin-bottom: 8px; flex-wrap: nowrap; }
.cost-row select { width: 230px; }
input.num-md { width: 130px; }
.row.spaced { margin-bottom: 16px; }
.grow2 { grid-column: span 2; }
.spaced-card { margin-bottom: 18px; }

/* ── Preços / relatórios ───────────────────────────────────────────── */
.sim-block { margin-bottom: 16px; }
.sim-block h3 { margin-bottom: 8px; }
.hero { display: flex; flex-direction: column; gap: 2px; margin-bottom: 16px; }
.hero strong { font-family: var(--serif); font-size: 44px; font-weight: 500; line-height: 1.1; }
td.strong { font-weight: 700; }
tr.mute td { color: var(--mute); }
.add-fee { margin-top: 12px; }
#gp select { min-width: 150px; }
.chart-box { position: relative; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--mute); font-size: 11px; font-family: var(--sans); }
svg.chart .bar { fill: var(--rose); }
svg.chart .hit { fill: transparent; cursor: crosshair; outline: none; }
svg.chart .hit:focus { fill: rgba(168, 90, 111, .06); }
svg.chart .line { fill: none; stroke: var(--rose); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .cross { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
svg.chart .dot { fill: var(--rose); stroke: var(--surface); stroke-width: 2; }
svg.chart .hidden { display: none; }
.chart-tip { position: absolute; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; box-shadow: var(--shadow-lift); font-size: 12.5px; pointer-events: none; min-width: 140px; z-index: 5; }
.chart-tip strong { font-size: 14px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quads { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 20px; }
.quad { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.quad strong { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.quad.on { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-2); }
details.card > summary { cursor: pointer; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-dot.on { background: var(--sage); box-shadow: 0 0 0 4px var(--sage-2); } .status-dot.off { background: var(--mute); }

/* ── Lightbox / modal / toast ──────────────────────────────────────── */
.lightbox { position: fixed; inset: 0; background: rgba(30,21,34,.88); display: grid; place-items: center; z-index: 50; cursor: zoom-out; padding: 24px; }
.lightbox img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 16px; }
.modal-bg { position: fixed; inset: 0; background: rgba(30,21,34,.45); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 40; padding: 16px; }
.modal { background: var(--surface); border-radius: 22px; padding: 28px; width: min(500px, 100%); box-shadow: 0 30px 80px rgba(30,21,34,.3); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal h2 { margin-bottom: 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--plum); color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 60; box-shadow: var(--shadow-lift); max-width: calc(100% - 32px); font-weight: 600; }
.toast.err { background: var(--coral); border-radius: 16px; }

/* ── Login ─────────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--bg); }
.auth-art { background: radial-gradient(120% 90% at 10% 0%, #46304d 0%, var(--plum) 50%, #1a121d 100%); color: #f1e6ee; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px solid rgba(184,147,95,.3); right: -180px; bottom: -160px; }
.auth-art::after { content: ''; position: absolute; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, rgba(201,139,155,.28), transparent 70%); right: -40px; bottom: -40px; }
.auth-art .quote { font-family: var(--serif); font-size: 40px; line-height: 1.15; max-width: 460px; font-weight: 400; letter-spacing: -.02em; }
.auth-art .quote em { color: #e7b9c5; font-style: italic; }
.auth-art .brand-name { font-size: 22px; }
.auth-panel { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(400px, 100%); }
.auth-card h1 { font-size: 32px; margin: 0 0 6px; }
.auth-card form { display: flex; flex-direction: column; gap: 16px; margin-top: 26px; }
.auth-card .btn { padding: 13px 18px; font-size: 15px; }
.auth-card .notice { margin-top: 18px; }
.auth-card .brand { padding: 0 0 26px; display: none; }
.err-msg { color: var(--coral); font-size: 13px; min-height: 18px; }

/* ── Responsivo ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .q { grid-column: 1 / -1; }
  .detail { grid-template-columns: 1fr; }
  .detail > aside { position: static; }
  .welcome { grid-template-columns: 1fr; }
  main.content { padding: 28px 28px 60px; }
}
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; } .pos-cart { position: static; } .filters-6 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-card .brand { display: flex; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 22% 0 0; z-index: 30; transform: translateX(-100%); transition: transform .22s; height: 100%; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(30,21,34,.4); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--plum); color: #fff; position: sticky; top: 0; z-index: 20; }
  .mobile-bar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
  .mobile-bar .brand-name { color: #fff; }
  main.content { padding: 20px 16px 56px; }
  .filters, .grid2, .grid3, .hero-stats { grid-template-columns: 1fr 1fr; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bar-row { grid-template-columns: 100px 1fr 44px; }
  h1 { font-size: 27px; }
  .hero-card { padding: 24px; } .hero-card h1 { font-size: 28px; }
}
@media (max-width: 520px) { .lrow { grid-template-columns: 64px 1fr; } .grid3 { grid-template-columns: 1fr; } }

/* Variantes: códigos e local só quando pedidos */
#vtable:not(.show-codes) .col-code { display: none; }
.hero-stats .kpi .val { font-size: 26px; white-space: nowrap; }

/* Ficha: painel de publicação só no Resumo; demais abas usam a largura toda */
.detail.wide { grid-template-columns: 1fr; }
.detail.wide > aside { display: none; }
@media (max-width: 760px) {
  .grid2 { grid-template-columns: 1fr; }
  .todo-item { grid-template-columns: 38px 1fr; }
  .todo-item .btn { grid-column: 2; justify-self: start; }
  .welcome { gap: 14px; }
}

/* Formação de preço: barra de ações em lote */
.batchbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 18px 22px; position: sticky; top: 10px; z-index: 5; }
.batchbar .chk { gap: 6px; font-weight: 600; color: var(--ink-2); padding-bottom: 10px; }
.batchbar .chk input { width: auto; }
#pt td { padding-top: 10px; padding-bottom: 10px; }
#pt .price-in { width: 110px; }

/* Card de produto com preço editável */
.pcard .ph { text-decoration: none; }
.pcard a.name { color: inherit; text-decoration: none; }
.pcard a.name:hover { color: var(--rose-ink); }
.pcard .cost-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.pcard .cost-line strong { color: var(--ink); }
.pcard .price-line { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.price-edit { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.price-field { position: relative; display: block; }
.price-field .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-family: var(--serif); color: var(--ink-2); font-size: 15px; text-transform: none; letter-spacing: 0; }
.price-field input { padding-left: 38px; font-family: var(--serif); font-size: 18px; font-weight: 500; }
.pcard.saved .price-field input { border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-2); }

/* Logo oficial (feita para fundo claro) */
.brand-logo { display: block; background: #fff; padding: 4px 6px; margin: 0 0 22px; }
.brand-logo img { display: block; width: 100%; height: auto; }
.auth-logo { display: block; width: min(280px, 80%); height: auto; margin: 0 0 26px; }
.auth-art { justify-content: center; gap: 28px; }
.mobile-mark { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.mobile-mark img { width: 30px; height: 30px; }
.row.wrap { flex-wrap: wrap; }
.publish-card { margin-bottom: 22px; border-left: 3px solid var(--rose); }
.publish-card p { margin: 6px 0 10px; }
.publish-card .btn { margin-top: 14px; }

/* Miniatura do produto na tabela de preços */
.pthumb-cell { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.pthumb { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid #eee4e8; display: grid; place-items: center; }
.pthumb img { width: 100%; height: 100%; object-fit: contain; }
.pthumb .noph { font-size: 10px; color: var(--mute); text-align: center; line-height: 1.1; }

/* Formação de preço: usa a largura toda e compacta as colunas para caber sem rolagem lateral */
main.content:has(#pt) { max-width: none; padding-left: 28px; padding-right: 28px; }
.card:has(> .table-wrap > #pt) { padding: 12px 8px; }
#pt th { padding: 8px 6px; font-size: 9.5px; letter-spacing: .05em; line-height: 1.25; }
#pt td { padding: 8px 6px; font-size: 13px; }
#pt td.small, #pt td .small { font-size: 11.5px; }
#pt .pthumb { width: 46px; height: 46px; }
#pt .pthumb-cell { min-width: 0; gap: 8px; }
#pt .pthumb-cell > div { min-width: 170px; line-height: 1.3; }
#pt .price-in { width: 92px; }
#pt input[type=checkbox] { margin: 0; }
.shell { grid-template-columns: 248px minmax(0, 1fr); }
main.content { min-width: 0; }
@media (max-width: 1500px) {
  #pt .pthumb-cell > div { min-width: 140px; }
  #pt th, #pt td { padding-left: 4px; padding-right: 4px; }
  #pt .price-in { width: 82px; }
}
@media (max-width: 1500px) {
  #pt td { font-size: 12px; }
  #pt td.small, #pt td .small { font-size: 11px; }
  #pt .pthumb { width: 40px; height: 40px; }
}
