/* Paleta da identidade visual Eliana Terços */
:root {
  --bg: #faf7fb;
  --surface: #ffffff;
  --surface-2: #f2eaf5;
  --ink: #2e1a33;
  --muted: #7a6680;
  --line: #e7dcec;
  --gold: #49254f;       /* roxo da marca: botões e destaques */
  --gold-soft: #f2eaf5;  /* lilás claro */
  --lilac: #ad8db8;
  --wood: #49254f;
  --ok: #2f7d4f;
  --danger: #b3362f;
  --whats: #1fa855;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(73, 37, 79, .06), 0 6px 20px rgba(73, 37, 79, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 Arial, Helvetica, sans-serif;
}
h1, h2, h3 { font-weight: 700; margin: 0; color: var(--wood); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }

.topbar {
  background: var(--wood);
  color: #fbf3e2;
  padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
}
.topbar h1 { font-size: 22px; letter-spacing: .3px; }
.topbar .sub { opacity: .8; font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar a { color: #fbf3e2; }
.topbar .btn { color: var(--ink); }
.topbar h1 { color: #fff; }

/* Cabeçalho branco com a logo (site público) */
.site-header {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header.static { position: static; }
.site-header .inner {
  max-width: 1180px; margin: 0 auto; padding: 8px 20px;
  display: flex; align-items: center; gap: 16px;
}
.site-header .logo img { height: 76px; width: auto; display: block; }
.site-header nav { margin-left: auto; display: flex; gap: 18px; align-items: center; }
.site-header nav a { color: var(--wood); text-decoration: none; font-weight: 700; font-size: 14px; }
.site-header nav a.btn { color: #fff; }
@media (max-width: 700px) {
  .site-header .logo img { height: 54px; }
  .site-header nav a:not(.btn) { display: none; }
}
.thumb { grid-template: 100% / 100%; }
.thumb.contain img { object-fit: contain !important; background: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 9px 16px; cursor: pointer; font-weight: 600;
  text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { border-color: var(--gold); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.primary:hover { background: #5e3266; }
.btn.whats { background: var(--whats); border-color: var(--whats); color: #fff; }
.btn.whats:hover { background: #178d46; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.block { width: 100%; padding: 13px 16px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

input[type=text], input[type=password], input[type=tel], input[type=email], input[type=search],
input[type=date], input[type=month], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-soft); border-color: var(--gold); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }

.muted { color: var(--muted); }
.hidden { display: none !important; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 100; font-size: 14px;
}

/* ---------- Página do cliente ---------- */
.page-title { max-width: 1180px; margin: 0 auto; padding: 22px 20px 0; }
.page-title h1 { font-size: 26px; }
.page-title p { margin: 4px 0 0; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.segmented button {
  border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 8px;
  font-weight: 700; font-size: 15px; cursor: pointer; color: var(--wood);
}
.segmented button:hover { border-color: var(--lilac); }
.segmented button[aria-checked=true] { background: var(--wood); border-color: var(--wood); color: #fff; }
.segmented.formats { grid-template-columns: repeat(5, 1fr); }
.segmented.formats button { font-size: 14px; padding: 10px 6px; }
.format-hint { margin: 8px 0 0; font-size: 14px; }
@media (max-width: 700px) {
  .segmented.formats { grid-template-columns: repeat(2, 1fr); }
  .segmented.formats button:last-child { grid-column: span 2; }
}

.delivery { border: 0; padding: 0; margin: 4px 0 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.delivery legend { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 6px; padding: 0; }
.radio-card {
  display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; background: #fff;
}
.radio-card:has(input:checked) { border-color: var(--wood); background: var(--surface-2); }
.radio-card input { margin-top: 3px; accent-color: var(--wood); }
.radio-card b { display: block; font-size: 14px; }
.radio-card small { color: var(--muted); font-size: 12px; line-height: 1.3; display: block; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 12px; }
.grid3 .span2 { grid-column: span 2; }
@media (max-width: 600px) {
  .delivery { grid-template-columns: 1fr; }
}

.done { text-align: center; padding: 8px 4px; }
.done-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 12px;
  background: var(--surface-2); color: var(--wood); display: grid; place-items: center;
  font-size: 28px; font-weight: 700;
}
.done .actions { margin-top: 16px; }
.builder {
  max-width: 1180px; margin: 0 auto; padding: 20px;
  display: grid; grid-template-columns: minmax(320px, 500px) 1fr; gap: 24px; align-items: start;
}
.preview {
  position: sticky; top: 16px; padding: 14px;
  background: radial-gradient(circle at 50% 35%, #ffffff, #efe5f3);
}
.preview svg { width: 100%; height: auto; max-height: calc(100vh - 140px); display: block; }
.preview .legend { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }

.step { padding: 18px; margin-bottom: 16px; }
.step-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.step-head .num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--gold-soft); color: var(--wood);
  display: inline-grid; place-items: center; font-weight: 700; font-size: 13px; flex: none;
}
.step-head h2 { font-size: 19px; }
.step-head .chosen { margin-left: auto; font-size: 13px; color: var(--gold); font-weight: 600; }
.step p.hint { margin: 0 0 12px 36px; font-size: 13px; color: var(--muted); }
.step .filter { margin-bottom: 12px; }

.options {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px;
  max-height: 370px; overflow-y: auto; padding: 2px;
}
.option {
  border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 6px;
  cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: border-color .12s, transform .12s;
}
.option:hover { border-color: #d6c19a; }
.option.selected { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.option .thumb {
  width: 100%; aspect-ratio: 1; border-radius: 8px; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.option .thumb img { width: 100%; height: 100%; object-fit: cover; }
.option .thumb svg { width: 72%; height: 72%; }
.option .thumb.cutout img { object-fit: contain; padding: 8%; }
.option.none .thumb span { color: var(--muted); font-weight: 700; font-size: 14px; }
.option .name { font-size: 12.5px; line-height: 1.25; font-weight: 600; }
.option .code { font-size: 11px; color: var(--muted); }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

.toggle-row { display: flex; align-items: center; gap: 10px; margin: 0 0 12px 36px; cursor: pointer; font-weight: 600; }
.name-box { margin-left: 36px; }
.summary { padding: 18px; }
.summary ul { list-style: none; padding: 0; margin: 10px 0 16px; }
.summary li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.summary li b { min-width: 120px; color: var(--muted); font-weight: 600; }
.actions { display: grid; gap: 10px; }

@media (max-width: 820px) {
  .builder { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .preview { top: 0; z-index: 5; padding: 6px; border-radius: 0 0 var(--radius) var(--radius); margin: -12px -12px 0; }
  .preview svg { height: 40vh; width: auto; margin: 0 auto; }
  .preview .legend { display: none; }
  .step p.hint, .toggle-row, .name-box { margin-left: 0; }
  .options { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); max-height: 300px; }
}

/* ---------- Cadastro ---------- */
.admin { max-width: 1180px; margin: 0 auto; padding: 20px; }
.login { max-width: 360px; margin: 10vh auto; padding: 24px; }
.login h2 { margin-bottom: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.tab.active { background: var(--wood); color: #fff; border-color: var(--wood); }
.tab .count { opacity: .65; font-weight: 500; margin-left: 4px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.toolbar input[type=search] { flex: 1; min-width: 180px; }
.toolbar select { width: auto; }

.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.piece { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.piece.off { opacity: .55; }
.piece .thumb {
  aspect-ratio: 4 / 3; border-radius: 10px; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.piece .thumb img { width: 100%; height: 100%; object-fit: cover; }
.piece .thumb svg { width: 55%; height: 55%; }
.piece .title { font-weight: 700; font-size: 14px; line-height: 1.25; }
.piece .meta { font-size: 12px; color: var(--muted); }
.piece .row { display: flex; gap: 6px; align-items: center; }
.piece .row .btn { flex: 1; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; user-select: none; }
.switch input { display: none; }
.switch .track { width: 38px; height: 22px; background: #cfc5b6; border-radius: 99px; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: left .15s; }
.switch input:checked + .track { background: var(--ok); }
.switch input:checked + .track::after { left: 19px; }

.modal-back { position: fixed; inset: 0; background: rgba(30, 20, 10, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 20px; }
.modal h2 { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 46px; height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; }
.photo-box { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.photo-box .thumb { width: 96px; height: 96px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-box .thumb img { width: 100%; height: 100%; object-fit: contain; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.cats { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 0; margin: 0 0 12px; display: flex; gap: 18px; flex-wrap: wrap; }
.cats legend { font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 4px; }
.cat-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.cat-tags span { font-size: 11px; font-weight: 700; background: var(--surface-2); color: var(--wood); border-radius: 99px; padding: 1px 8px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.settings { padding: 20px; }
.settings h2 { font-size: 19px; }
.settings p.muted { font-size: 13px; margin: 4px 0 14px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings-save { grid-column: 1 / -1; }
.badge {
  background: #d6336c; color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 7px; margin-left: 6px;
}

.quote { display: flex; gap: 16px; padding: 14px; margin-bottom: 12px; }
.quote.status-cancelado { opacity: .6; }
.quote-img { flex: none; width: 120px; }
.quote-img img { width: 120px; border-radius: 10px; background: var(--surface-2); display: block; }
.quote-body { flex: 1; min-width: 0; }
.quote-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.quote-head h3 { font-size: 17px; }
.quote-date { margin-left: auto; font-size: 13px; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--surface-2); color: var(--wood); }
.status-novo .pill { background: #d6336c; color: #fff; }
.status-fechado .pill { background: #e3f6ea; color: var(--ok); }
.quote-items { list-style: none; padding: 0; margin: 8px 0; font-size: 14px; columns: 2; column-gap: 24px; }
.quote-items b, .quote-customer b { color: var(--muted); font-weight: 600; }
.quote-customer { font-size: 14px; padding: 8px 0; border-top: 1px dashed var(--line); }
.quote-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.quote-actions select { width: auto; padding: 5px 10px; }
.email-status { font-size: 12px; }
.link-danger { background: none; border: 0; color: var(--danger); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 0; }
.quote-delete { margin-left: auto; }

.finance { padding: 16px; margin-bottom: 14px; }
.finance-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.finance-head h2 { font-size: 18px; }
.finance-head input[type=month] { width: auto; padding: 6px 10px; }
.finance-head .spacer { flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.kpi { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.kpi span { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi b { display: block; font-size: 22px; color: var(--wood); margin: 2px 0; }
.kpi small { color: var(--muted); font-size: 12px; }

.fin { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 8px; }
.fin-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fin-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fin-row input, .fin-row select { width: auto; padding: 6px 10px; }
.fin-price, .pay-amount { width: 130px !important; }
.fin-state { font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-left: auto; }
.fin-state.none { color: var(--muted); font-weight: 500; }
.fin-state.due { background: #fdebec; color: var(--danger); }
.fin-state.part { background: #fff4d6; color: #8a5a00; }
.fin-state.ok { background: #e3f6ea; color: var(--ok); }
.fin-payments { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.fin-payments li { padding: 2px 0; }
.fin-payments:empty { display: none; }
.fin-notes { font-size: 13px; resize: vertical; }
@media (max-width: 700px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .fin-state { margin-left: 0; }
}
@media (max-width: 700px) {
  .settings-grid { grid-template-columns: 1fr; }
  .quote { flex-direction: column; }
  .quote-img, .quote-img img { width: 100%; max-width: 220px; }
  .quote-items { columns: 1; }
  .quote-date { margin-left: 0; }
}

@media (max-width: 600px) {
  .admin { padding: 12px; }
  .grid2 { grid-template-columns: 1fr; }
  .pieces { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

/* ---------- Modelos prontos ---------- */
.choices {
  max-width: 1140px; margin: 16px auto 0; padding: 16px 18px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.choices h2 { font-size: 16px; margin-bottom: 10px; }
.choices > .hidden + div { grid-column: 1 / -1; }
.segmented.two { grid-template-columns: 1fr 1fr; }
.models { max-width: 1180px; margin: 0 auto; padding: 16px 20px 40px; }
.color-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.color-chips button {
  display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: #fff;
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--wood); cursor: pointer;
}
.color-chips button:hover { border-color: var(--lilac); }
.color-chips button[aria-checked=true] { border-color: var(--wood); background: var(--surface-2); }
.color-dot {
  width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.color-dots { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 12px; }
.models-count { font-size: 13px; margin: 12px 0 8px; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.model-card {
  border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: 6px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--ink);
}
.model-card:hover { border-color: var(--lilac); box-shadow: var(--shadow); }
.model-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface-2); margin-bottom: 4px; }
.model-card .name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.model-card .code { font-size: 11px; color: var(--muted); }
.model-view { width: min(640px, 100%); }
.model-view img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: var(--surface-2); margin-bottom: 12px; }
.model-view h2 { margin-bottom: 2px; }
.model-view .color-dots { margin: 8px 0; }
.model-view #mv-notes { white-space: pre-line; font-size: 14px; }
.q-model { display: flex; gap: 12px; align-items: center; background: var(--surface-2); border-radius: 12px; padding: 8px; margin-bottom: 14px; }
.q-model img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.q-model div { display: flex; flex-direction: column; font-size: 14px; }
.q-model span { font-size: 12px; }
.center { text-align: center; }
.color-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 12px; margin-bottom: 10px; width: 100%; }
.color-pick { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
#f-model-colors { display: block; padding-bottom: 10px; }
.cat-tags span.featured { background: var(--wood); color: #fff; }
@media (max-width: 700px) {
  .choices { grid-template-columns: 1fr; margin: 12px 12px 0; gap: 14px; }
  .models { padding: 12px; }
  .model-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
}
.color-toggles { display: flex; flex-wrap: wrap; gap: 3px; }
.color-toggles button { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; line-height: 0; }
.color-toggles button[aria-pressed=false] .color-dot { opacity: .22; transform: scale(.8); }
.color-toggles button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--wood); }

.review-note { color: #9a5b12; font-size: 12px; line-height: 1.3; }
#formats-wrap { grid-column: 1 / -1; }

/* ---------- fase 2: em falta, peça de perto, revisão ---------- */
.option.out { cursor: not-allowed; opacity: .55; position: relative; }
.option.out .thumb { filter: grayscale(.8); }
.out-badge { font-size: 10.5px; font-weight: 700; color: #9a3412; background: #ffedd5; border-radius: 999px; padding: 1px 8px; }
button.chosen { border: 0; background: none; font: inherit; color: inherit; cursor: default; padding: 0; text-align: right; }
button.chosen.can-zoom { cursor: zoom-in; text-decoration: underline dotted; text-underline-offset: 3px; }
button.chosen.can-zoom::before { content: "🔍 "; font-size: 12px; }
.link-btn { border: 0; background: none; color: var(--wood); font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px 0; font-size: 14px; }
.save-note { font-size: 12.5px; margin: 8px 0 0; text-align: center; }

.piece-zoom { max-width: 460px; position: relative; text-align: center; }
.pz-x { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.pz-stage { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 4px; margin: 8px 0 12px; }
.pz-stage img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--surface-2); border-radius: 12px; padding: 6%; }
.pz-nav { border: 2px solid var(--line); background: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 22px; cursor: pointer; color: var(--wood); }
.pz-nav:hover { border-color: var(--lilac); }
.pz-out { color: #9a3412; font-weight: 700; }
.piece-zoom h2 { margin: 0; }

.q-review { margin: 8px 0 4px; }
.q-step { font-weight: 700; color: var(--wood); margin: 10px 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; }
.qr-grid { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.qr-grid > img { width: 100%; aspect-ratio: 4 / 7; object-fit: contain; border-radius: 10px; background: #fffdf8; border: 1px solid var(--line); }
.qr-name { margin: 6px 0 0; }
.qr-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.qr-list li { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.qr-list small { display: block; color: var(--muted); font-size: 12px; }
.qr-thumb { width: 36px; height: 36px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.qr-thumb img { width: 86%; height: 86%; object-fit: contain; }
.qr-thumb svg { width: 100%; height: 100%; }
.qr-qty { font-weight: 700; color: var(--wood); }
@media (max-width: 600px) {
  .qr-grid { grid-template-columns: 1fr; }
  .qr-grid > img { max-width: 220px; justify-self: center; }
}
.production { margin: 8px 0; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.production summary { cursor: pointer; font-weight: 700; color: var(--wood); }
.production ul { list-style: none; padding: 0; margin: 8px 0 2px; display: grid; gap: 6px; }
.production li { display: grid; grid-template-columns: 36px 1fr auto; gap: 8px; align-items: center; font-size: 13.5px; }
.production small { display: block; color: var(--muted); font-size: 12px; }
.name-count { font-size: 13px; margin: -4px 0 10px; }
.name-count.over { color: #9a3412; font-weight: 700; }
.name-pos-wrap { margin: 0 0 14px; }
.field-label { display: block; font-size: 13px; font-weight: 700; color: var(--wood); margin-bottom: 6px; }
.segmented.name-pos { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.segmented.name-pos button { font-size: 13px; padding: 9px 4px; }
@media (max-width: 600px) { .segmented.name-pos { grid-template-columns: 1fr 1fr; } .segmented.name-pos button:first-child { grid-column: span 2; } }
#modes-wrap:has(+ .hidden) { grid-column: 1 / -1; }
.per-big { margin: 0 0 10px 36px; }
.per-big .toggle-row { margin-left: 0; }
@media (max-width: 820px) { .per-big { margin-left: 0; } }
.big-hint { font-size: 13px; margin: 0 0 8px; }
.big-slots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.big-slot { display: grid; justify-items: center; gap: 2px; width: 52px; padding: 4px; border: 2px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--wood); }
.big-slot img { width: 30px; height: 30px; object-fit: contain; }
.big-slot.active { border-color: #7a3f86; box-shadow: 0 0 0 3px #eadcf0; }
