/* rxms3d · la app (Cotizar · Pedidos · Tienda · Taller · Ajustes). Usa los colores de site.css. */
:root { --ok: #12a150; --warn: #d97706; --bad: #e0352b; --sh: 0 1px 2px rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.05); }
:root[data-theme="dark"] { --sh: none; }
body.app { font-size: 16px; line-height: 1.5; padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
.app .bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
.app .bar .wrap { padding-block: 10px; }
.tabs { display: flex; gap: 4px; background: var(--soft); border-radius: 999px; padding: 4px; }
.tabs a { position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14.5px; }
.tabs a svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tabs a:hover { color: var(--ink); }
.cnt { position: absolute; top: 2px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--green); color: #fff; font: 800 11px/18px var(--font); font-style: normal; text-align: center; padding: 0 5px; }
.acts { display: flex; align-items: center; gap: 8px; }
.btn.small { padding: 8px 15px; font-size: 13.5px; }
.ic-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.pill { border: 0; border-radius: 999px; background: #e7f7ed; color: #00782d; font: 800 12.5px var(--font); padding: 7px 12px; cursor: pointer; }
:root[data-theme="dark"] .pill { background: #12351f; color: #5ee38f; }
@media (max-width: 860px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px)); justify-content: space-around; }
  .tabs a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11.5px; flex: 1; justify-content: center; border-radius: 14px; }
  .tabs a[aria-current="page"] { background: var(--soft); box-shadow: none; color: var(--green-d); }
  :root[data-theme="dark"] .tabs a[aria-current="page"] { color: #5ee38f; }
  .tabs a svg { width: 22px; height: 22px; }
  .cnt { right: calc(50% - 22px); top: 0; }
  .wm { display: none; }
}
@media (max-width: 360px) { .acts .pill { display: none; } }

main { padding-block: 22px 40px; }
.head { margin: 6px 0 18px; display: grid; gap: 4px; }
.head h1 { font: 800 clamp(28px, 5vw, 40px)/1.08 var(--font); letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.head .lede { margin: 0; font-size: 17px; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.c { justify-content: center; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols-l { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
@media (max-width: 860px) { .cols, .cols-l { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 22px; display: grid; gap: 14px; box-shadow: var(--sh); min-width: 0; margin-bottom: 16px; }
.cols > .card { margin-bottom: 0; }
.cols { margin-bottom: 16px; }
.card h2 { margin: 0; font: 800 21px/1.2 var(--font); letter-spacing: -.02em; }
.card h3 { margin: 6px 0 0; font-size: 15px; }
.card h2 small { font-size: 13px; font-weight: 700; }
.ok-t { color: #0b7a3b; }
:root[data-theme="dark"] .ok-t { color: #5ee38f; }
.hint { margin: 0; color: var(--muted); font-size: 14px; }
.lbl { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--muted); min-width: 0; }
label.inl { display: flex; align-items: center; gap: 10px; }
input, select, textarea { font: 500 16px var(--font); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: var(--card); min-width: 0; width: 100%; }
.row input, .row select { width: auto; flex: 1 1 160px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.f { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: hidden; }
.f input { border: 0; border-radius: 0; flex: 1; min-width: 0; }
.f span { padding: 0 10px; color: var(--muted); font-weight: 600; }
.f.sm { flex: 1 1 140px; max-width: 200px; }
.r2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 480px) { .r2 { grid-template-columns: minmax(0, 1fr); } }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
details.more { border-top: 1px solid var(--line); padding-top: 12px; }
details.more > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 6px; }
details.more > summary::before { content: "›"; display: inline-block; transition: transform .15s; font-size: 20px; line-height: 1; color: var(--muted); }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > summary small { color: var(--muted); font-weight: 500; }
details.more[open] > summary { margin-bottom: 12px; }
details.more > .r2 { margin-bottom: 10px; }

/* subir archivo */
.drop { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 30px 16px; border: 2px dashed var(--line); border-radius: 20px; cursor: pointer; background: var(--soft); color: var(--ink); }
.drop.sm { padding: 18px 14px; }
.drop svg { width: 34px; height: 34px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop b { font-size: 17px; }
.drop span { font-weight: 500; font-size: 13.5px; color: var(--muted); }
.drop.over, .drop:hover { border-color: var(--green); }
.drop.has { border-style: solid; border-color: var(--green); }

/* resultado del cotizador */
.big2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.big2 > div { background: var(--soft); border-radius: 18px; padding: 16px; display: grid; gap: 2px; min-width: 0; }
.big2 .sell { background: #e7f7ed; }
:root[data-theme="dark"] .big2 .sell { background: #12351f; }
.big2 small { font-weight: 700; color: var(--muted); font-size: 13px; }
.big2 b { font: 800 clamp(28px, 6vw, 40px)/1.05 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.big2 .sell b { color: #00782d; }
:root[data-theme="dark"] .big2 .sell b { color: #5ee38f; }
.big2 span { font-size: 13px; color: var(--muted); }
.gan { display: grid; gap: 8px; }
.gan input { padding: 0; border: 0; accent-color: var(--green); background: transparent; }
table.mini { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0; }
table.mini td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
table.mini td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
table.mini tr.t td { font-weight: 800; border-bottom: 0; }

/* flujo de pedidos */
.flow { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.flow li { margin: 0; }
.flow button { width: 100%; height: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 10px 8px; text-align: left; cursor: pointer; display: grid; gap: 2px; font: 600 12.5px/1.25 var(--font); position: relative; }
.flow button b { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.flow button .w { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.flow button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.flow button.z b { color: var(--muted); }
.flow button .bot { position: absolute; top: 8px; right: 8px; font-size: 13px; }
@media (max-width: 860px) { .flow { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; margin-inline: -4px; padding-inline: 4px; } .flow li { flex: 0 0 132px; scroll-snap-align: start; } }
.list { display: grid; gap: 10px; align-content: start; min-width: 0; }
.pc2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; cursor: pointer; text-align: left; color: var(--ink); font: inherit; width: 100%; }
.pc2[aria-current="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.pc2 b { font-size: 16px; }
.pc2 .m { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc2 .p { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); }
.tag.g { background: #e3f6ea; color: #0b7a3b; }
.tag.y { background: #fff4e0; color: #9a5b00; }
:root[data-theme="dark"] .tag.g { background: #12351f; color: #5ee38f; }
:root[data-theme="dark"] .tag.y { background: #3a2a0c; color: #ffc46b; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); background: var(--soft); border-radius: 20px; }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.det { position: sticky; top: 84px; }
@media (max-width: 860px) { .det { position: static; } }
.det .x { justify-self: end; border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--ink); font-size: 18px; margin-bottom: -40px; }
.next { background: var(--soft); border-radius: 18px; padding: 16px; display: grid; gap: 10px; }
.next .q { font-weight: 800; font-size: 17px; }
.btn.big { padding: 15px 22px; font-size: 16px; width: 100%; text-align: center; }
.btn.ghost.small, .btn.ghost { box-shadow: inset 0 0 0 1.5px var(--line); }
.lnk { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: 600 13.5px var(--font); justify-self: start; }
.lnk.bad { color: var(--bad); }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.tl li { margin: 0; }
.items { display: grid; gap: 6px; }
.it2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; font-size: 15px; }
.it2 span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.tot { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; border-top: 1px solid var(--line); padding-top: 8px; }

/* tienda */
.link-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.link-card code { font: 600 15px var(--font); word-break: break-all; color: var(--ink); }
@media (max-width: 560px) { .link-card { grid-template-columns: minmax(0, 1fr); } }
.swatch { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch button[aria-checked="true"] { box-shadow: 0 0 0 2.5px var(--ink); }
.logo-prev { width: 56px; height: 56px; object-fit: contain; border-radius: 12px; background: var(--soft); }
.cover-prev { width: 120px; height: 56px; object-fit: cover; border-radius: 12px; background: var(--soft); }
input.colorpick { width: 48px; height: 38px; padding: 2px; flex: none; cursor: pointer; }
.plist, .clist { display: grid; gap: 8px; }
.pr { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--soft); border-radius: 16px; padding: 10px 12px; }
.pr img, .pr .ph { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--line); display: grid; place-items: center; color: var(--muted); font-size: 20px; }
.pr b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr small { color: var(--muted); }
.pr .a { display: flex; gap: 6px; align-items: center; }
.ci { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 10px 14px; font-size: 14.5px; }
.ci code { font-weight: 800; }
.sw { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-weight: 500; cursor: pointer; }
.sw input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); flex: none; padding: 0; }

/* taller */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 16px; }
.prn { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 16px; display: grid; gap: 8px; }
.prn .st { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.g { background: var(--ok); } .dot.y { background: var(--warn); } .dot.r { background: var(--bad); }
.bar2 { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar2 i { display: block; height: 100%; background: var(--green); }
.steps { margin: 0; padding-left: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; }
.steps > li { counter-increment: s; position: relative; padding-left: 44px; margin: 0; color: var(--ink); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -3px; width: 32px; height: 32px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps > li .row { margin-top: 8px; }
.steps.sm > li { font-size: 14.5px; }
.copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--soft); border-radius: 12px; padding: 8px 8px 8px 12px; margin-top: 6px; }
.copy code { font: 600 13px ui-monospace, Menlo, monospace; word-break: break-all; color: var(--ink); }
.beta { font: 700 12px var(--font); background: #fff4e0; color: #9a5b00; border-radius: 999px; padding: 3px 9px; vertical-align: middle; letter-spacing: 0; }
:root[data-theme="dark"] .beta { background: #3a2a0c; color: #ffc46b; }

/* Pro bloqueado */
.lock { max-width: 560px; margin: 30px auto; text-align: center; justify-items: center; padding: 36px 24px; }
.lock > svg { width: 52px; height: 52px; fill: none; stroke: var(--green); stroke-width: 2; stroke-linecap: round; }
.lock h1 { margin: 0; font: 800 30px/1.1 var(--font); letter-spacing: -.03em; }
.lock .lede { margin: 0; }
.price { font: 800 34px var(--font); letter-spacing: -.03em; }
.price small { font-size: 15px; color: var(--muted); font-weight: 600; }

/* diálogo y avisos */
.dlg { border: 0; border-radius: 24px; padding: 0; width: min(94vw, 520px); max-height: 90vh; background: var(--bg); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg form { padding: 22px; display: grid; gap: 12px; margin: 0; }
.dlg h2 { margin: 0; font: 800 22px var(--font); letter-spacing: -.02em; }
.dlg .lines { display: grid; gap: 8px; }
.dlg .ln { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 32px; gap: 6px; align-items: center; }
.dlg .ln button { border: 0; background: var(--soft); border-radius: 50%; width: 32px; height: 32px; cursor: pointer; color: var(--ink); }
@media (max-width: 480px) { .dlg .ln { grid-template-columns: minmax(0, 1fr) 56px 84px 32px; } }
#toasts { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: grid; gap: 8px; z-index: 99; width: max-content; max-width: 92vw; }
.toast { background: #111; color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14.5px; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
:root[data-theme="dark"] .toast { background: #f2f2f3; color: #111; }
@media (min-width: 861px) { #toasts { bottom: 24px; } }

.ck { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck li { padding-left: 28px; position: relative; font-size: 15.5px; margin: 0; }
.ck li::before { content: "✓"; position: absolute; left: 4px; color: var(--green); font-weight: 800; }
.ci.lam { flex-wrap: wrap; }
.ci .row select { width: auto; flex: 0 1 160px; padding: 8px 10px; font-size: 14px; }
.big3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.big3 > div { background: var(--soft); border-radius: 16px; padding: 14px; display: grid; gap: 2px; min-width: 0; }
.big3 small { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.big3 b { font: 800 clamp(20px, 3.4vw, 28px)/1.1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.big3 .g b { color: #00782d; }
:root[data-theme="dark"] .big3 .g b { color: #5ee38f; }
@media (max-width: 560px) { .big3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rs { display: grid; gap: 4px; background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; }
.rs.off { opacity: .55; }
.rs .row-b { gap: 8px; }
.stars { color: #f5a524; letter-spacing: 1px; }
/* niveles */
.mod-off { display: none !important; }
.nivel-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 12px; font: 700 13px var(--font); cursor: pointer; }
.nivel-btn:hover { background: var(--soft); }
@media (max-width: 560px) { .nivel-btn #nivel-tx { display: none; } .nivel-btn { padding: 7px 10px; } }
.lvls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 760px) { .lvls { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lvls button { text-align: left; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 20px; padding: 16px; display: grid; gap: 4px; cursor: pointer; font: inherit; }
.lvls button .ic { font-size: 26px; }
.lvls button b { font-size: 17px; }
.lvls button small { color: var(--muted); font-size: 13px; line-height: 1.35; }
.lvls button[aria-checked="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green); background: #f1fbf4; }
:root[data-theme="dark"] .lvls button[aria-checked="true"] { background: #12351f; }
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.blq > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: auto minmax(0, 1fr) 120px; gap: 12px; align-items: center; }
.blq > summary::-webkit-details-marker { display: none; }
.blq > summary .ic { font-size: 30px; }
.blq > summary b { display: block; font-size: 19px; }
.blq > summary small { color: var(--muted); font-size: 13.5px; }
@media (max-width: 480px) { .blq > summary { grid-template-columns: auto minmax(0, 1fr); } .blq > summary .bar2 { grid-column: 1 / -1; } }
.blq.done > summary small { color: var(--green-d); font-weight: 700; }
.logros { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.logros li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--soft); border-radius: 14px; padding: 10px 12px; margin: 0; }
.logros li .ck { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-weight: 800; color: #fff; }
.logros li.ok .ck { background: var(--green); border-color: var(--green); }
.logros li.ok b { color: var(--muted); text-decoration: line-through; font-weight: 600; }
.logros li small { display: block; color: var(--muted); font-size: 13px; }
.sube { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: #e7f7ed; border-radius: 14px; padding: 12px 14px; }
:root[data-theme="dark"] .sube { background: #12351f; }
.sube .btn { margin-left: auto; }
.exam { margin: 4px 0 14px; background: var(--soft); border-radius: 14px; padding: 12px 14px; border-top: 0; }
.exam fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.exam legend { font-weight: 700; margin-bottom: 6px; }
.exam label { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); margin-bottom: 8px; cursor: pointer; font-size: 15px; font-weight: 500; color: var(--ink); }
.exam label:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.exam input[type="radio"] { width: 18px; height: 18px; flex: none; margin: 0; padding: 0; accent-color: var(--green); }
.blq .logros { margin: 14px 0 4px; }
.blq .sube { margin-top: 14px; }
.blq > .lbl { display: block; margin: 16px 0 8px; }
/* opciones avanzadas */
.inv-add input[type=color] { width: 46px; height: 42px; padding: 3px; flex: 0 0 46px; border-radius: 10px; }
.inv-add select { flex: 0 1 120px; }
.roll { align-items: center; }
.roll .sw-c { width: 26px; height: 26px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.roll .rinfo { flex: 1; display: grid; gap: 4px; min-width: 0; }
.roll.low { box-shadow: inset 0 0 0 1.5px #f59e0b; }
.bad-t { color: var(--bad); }
.mant { background: var(--soft); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; }
.tarea { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--card); border-radius: 12px; padding: 8px 10px; font-size: 14.5px; }
.tarea small { display: block; color: var(--muted); font-size: 12.5px; }
.tarea .bar2 { margin-top: 4px; }
.tarea.toca { box-shadow: inset 0 0 0 1.5px #f59e0b; }
.tarea.toca .bar2 i { background: #f59e0b; }
.pls { display: grid; gap: 10px; }
.pls textarea { min-height: 70px; font-size: 14.5px; }
#cz-mis .lbl { display: block; margin: 8px 0 8px; }

/* ayudantes, devoluciones, cotizaciones */
.helpbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--soft); border: 2px solid var(--green-d); border-radius: 16px; padding: 10px 14px; margin: 12px 0; font-weight: 600; }
body.help #t-ajustes .card:not(#eqh-card) { display: none !important; }
body.help #mes-card, body.help #cli-card .row a { display: none !important; }
.refund { display: grid; gap: 8px; background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.it2.dim { color: var(--muted); font-size: 13.5px; }
.clist b.bad { color: var(--bad); }
.cot-foto { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin: 6px 0; object-fit: contain; background: var(--soft); }
#cli-card .ci .row { gap: 12px; flex-wrap: nowrap; }
@media (max-width: 560px) { #cli-card .row-b { flex-wrap: wrap; } #cli-card .row-b input { max-width: none !important; width: 100% !important; } }
.warnbox { background: var(--soft); border: 2px solid var(--bad); border-radius: 14px; padding: 10px 14px; margin: 8px 0; }
.warnbox p { margin: 4px 0; }
.ci.dim { opacity: .6; }
#ap-ayuda { display: grid; gap: 10px; }
.tag.r { background: #fde8e8; color: #b42318; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.r { background: #3a1513; color: #ff8a80; } }
:root[data-theme="dark"] .tag.r { background: #3a1513; color: #ff8a80; }
#ml-card.ml-off { display: none !important; }

/* =====================================================================
   v2 · diseño limpio y ordenado (encima de lo anterior)
   ===================================================================== */
:root { --pg: #f4f5f8; --card: #ffffff; --line: #e4e6ec; --sh: 0 1px 2px rgba(16,19,28,.04); --gd: #e7f7ed; --gdt: #00782d; }
:root[data-theme="dark"] { --pg: #0b0d12; --card: #13161e; --line: #262a36; --gd: #12351f; --gdt: #5ee38f; }
body.app { background: var(--pg); }
.app .bar { background: var(--card); }
/* el desenfoque solo en compu: en el cel haría que la barra de abajo se pegue arriba */
@media (min-width: 861px) { .app .bar { background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); } }
.app .bar .wrap { padding-block: 9px; }
@media (min-width: 861px) {
  .tabs { background: transparent; gap: 2px; padding: 0; }
  .tabs a, .tmore { padding: 8px 12px; font-size: 14px; }
  .tabs a[aria-current="page"] { background: var(--soft); box-shadow: none; color: var(--ink); }
}
.tmore { display: none; border: 0; background: none; color: var(--muted); font: 700 14px var(--font); border-radius: 999px; cursor: pointer; align-items: center; gap: 7px; }
.tmore svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.tmore[aria-current="page"] { color: var(--green-d); }
@media (max-width: 860px) {
  .tabs { background: var(--card); }
  .tabs a.ovf { display: none; }
  .tmore:not([hidden]) { display: flex; flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 11.5px; flex: 1; justify-content: center; border-radius: 14px; }
  .tmore svg { width: 22px; height: 22px; }
  .tmore[aria-current="page"] { background: var(--soft); }
}
main { padding-block: 18px 40px; }
.head { margin: 4px 0 16px; }
.head h1 { font-size: clamp(26px, 4.2vw, 34px); }
.head .lede { font-size: 16px; color: var(--muted); }
.kick { margin: 0; font: 700 13px var(--font); color: var(--muted); text-transform: capitalize; }
.card { border-radius: 20px; padding: 20px; gap: 12px; box-shadow: var(--sh); margin-bottom: 14px; }
.card h2 { font-size: 18px; }
.cols { gap: 14px; margin-bottom: 14px; }
.big2 > div, .big3 > div { border-radius: 14px; }
.big2 .sell, .sube, .lvls button[aria-checked="true"] { background: var(--gd); }
.big2 .sell b, .big3 .g b { color: var(--gdt); }
input, select, textarea { border-radius: 10px; }
.f { border-radius: 10px; }
.btn.ghost { background: var(--card); }
.ci, .pr, .rs, .refund, .next, .mant, .logros li { border-radius: 12px; }
.pc2 { border-radius: 14px; }
.lnk { text-decoration: none; color: var(--green-d); font-weight: 700; }
:root[data-theme="dark"] .lnk { color: #5ee38f; }
.lnk.bad { color: var(--bad); }

/* pedidos: pasos más limpios */
.flow { gap: 6px; }
.flow button { border-radius: 14px; padding: 10px; background: var(--card); }
.flow button b { font-size: 20px; }

/* ajustes por grupos */
.subnav { position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 15; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 10px; margin-bottom: 6px; background: var(--pg); scrollbar-width: none; }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; text-decoration: none; color: var(--ink); font: 700 13.5px var(--font); padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.subnav a[aria-current="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
.grp { scroll-margin-top: 120px; margin-bottom: 10px; }
.gh { font: 800 12.5px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 2px 10px; }
.gcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.gcols > .card { margin-bottom: 0; }
.gcols.one { grid-template-columns: minmax(0, 1fr); }

/* ---------- panel (Inicio) ---------- */
.pn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pn-grid > .card { margin-bottom: 0; }
@media (max-width: 860px) { .pn-grid { grid-template-columns: minmax(0, 1fr); } }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--soft); border-radius: 14px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.kpi small { font: 700 12.5px var(--font); color: var(--muted); }
.kpi b { font: 800 clamp(20px, 3.2vw, 26px)/1.1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi.g { background: var(--gd); } .kpi.g b { color: var(--gdt); }
.kpi.y b { color: var(--warn); }
.kpi span { font-size: 12.5px; color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; align-items: end; height: 96px; padding-top: 6px; }
.bars div { display: grid; grid-template-rows: 1fr auto; gap: 4px; height: 100%; text-align: center; min-width: 0; }
.bars i { align-self: end; display: block; background: var(--green); border-radius: 6px 6px 3px 3px; min-height: 3px; }
.bars i.z { background: var(--line); }
.bars small { font: 700 11px var(--font); color: var(--muted); }
.urg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.urg:empty { display: none; }
.urg button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 13.5px var(--font); cursor: pointer; }
.urg button.r { border-color: var(--bad); }
.urg button.y { border-color: var(--warn); }
.urg button b { font-variant-numeric: tabular-nums; }
.pasos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 480px) { .pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pasos button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 10px; text-align: left; display: grid; gap: 0; cursor: pointer; font: 600 12.5px/1.25 var(--font); }
.pasos button b { font-size: 22px; font-weight: 800; }
.pasos button.z b { color: var(--muted); }
.pnp { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 10px 12px; border: 0; width: 100%; text-align: left; color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.pnp b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnp small { color: var(--muted); font-size: 12.5px; }
.pnp .p { font-weight: 800; font-variant-numeric: tabular-nums; }
.pnr { display: grid; gap: 6px; background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pnr .row-b { gap: 8px; }
.pnr .bar2 { background: var(--line); }
.sheet .navl { display: grid; gap: 6px; }
.sheet .navl a { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; }
.sheet .navl a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* pago de Pro por transferencia */
.spei { display: grid; gap: 10px; background: var(--soft); border-radius: 14px; padding: 14px; }
.spei .dato { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; background: var(--card); border-radius: 10px; padding: 8px 8px 8px 12px; }
.spei .dato small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.spei .dato code { font: 700 15px ui-monospace, Menlo, monospace; letter-spacing: .02em; word-break: break-all; color: var(--ink); }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 13.5px var(--font); cursor: pointer; }
.seg button[aria-pressed="true"] { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.kick { text-transform: none; }
.kpi { align-content: start; }
@media (min-width: 861px) { .tabs .cnt { position: static; margin-left: 2px; } }
@media (max-width: 860px) { .urg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; } .urg::-webkit-scrollbar { display: none; } .urg button { flex: none; } }
#t-ajustes .card { scroll-margin-top: 130px; }
.spei .dato code { font: 800 16px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.det0 { display: none; }
@media (min-width: 861px) { #pd-det[hidden] + .det0 { display: grid; } }
.pfile { display: grid; gap: 8px; }

/* precio por mayoreo */
#cz-may .tw { overflow-x: auto; }
table.may { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table.may th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.may td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.may th:first-child, table.may td:first-child { text-align: left; }
table.may td.pu { font-weight: 800; color: var(--green-d, #009638); }
table.may tr.uno td { color: var(--muted); }
#cz-may .r3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { #cz-may .r3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } #cz-may .r3 > :last-child { grid-column: 1 / -1; } }
#cz-may .row-b { flex-wrap: wrap; gap: 8px; }
/* cotización con archivo del cliente */
.cotbox { background: var(--soft); border-radius: 14px; padding: 12px 14px; font-size: 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.cotbox.ok { background: rgba(0, 174, 66, .1); color: var(--ink); }
.cotbox.bad { background: rgba(224, 53, 43, .1); }
.cotbox .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* imprimir en 3 pasos */
.imp3 { display: grid; gap: 8px; }
.imp3-n { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.imp3-n div { background: var(--soft); border-radius: 14px; padding: 10px 12px; display: grid; min-width: 0; }
.imp3-n b { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.imp3-n span { font-size: 12px; color: var(--muted); font-weight: 600; }
.imp3-n div:last-child b { color: var(--green); }
.imp3 .orca { color: var(--green); font-weight: 700; }
#tl-drop.lam b::after { content: ""; display: inline-block; width: .8em; height: .8em; margin-left: 8px; border: 2px solid var(--green); border-right-color: transparent; border-radius: 50%; animation: gira .8s linear infinite; vertical-align: -1px; }
@keyframes gira { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .imp3-n { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { #tl-drop.lam b::after { animation: none; } }

.entcli { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--soft); font-size: 14px; overflow-wrap: anywhere; }

/* multicolor (AMS) */
.ams { display: grid; gap: 8px; background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.amsr { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 14px; font-variant-numeric: tabular-nums; }
.amsr i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.amsp { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }

/* cámara */
.camdlg { width: min(720px, calc(100vw - 32px)); }
.camw { display: grid; gap: 10px; padding: 18px; }
.camw .x { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; color: var(--ink); font-size: 18px; }
.camw .bad { color: var(--bad); }
.camw .row-b { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.camw h2 { margin: 0; }
.camimg { aspect-ratio: 16 / 9; max-width: 100%; background: #000; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.camimg img { width: 100%; height: 100%; object-fit: contain; }
.camimg .hint { color: #bbb; }
.cam-b small { font-weight: 500; opacity: .75; }

/* cotizar → G-code → imprimir */
.czo { display: grid; gap: 10px; border: 1.5px solid var(--green); border-radius: 16px; padding: 14px; }
.czo b { font-size: 15px; }
.czo .hint { margin: 0; }
.czo .czo-dl { display: flex; align-items: flex-end; }
.czo .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.czo .gira::before { content: ""; display: inline-block; width: .85em; height: .85em; margin-right: 8px; border: 2px solid var(--green); border-right-color: transparent; border-radius: 50%; animation: gira .8s linear infinite; vertical-align: -1px; }
@media (prefers-reduced-motion: reduce) { .czo .gira::before { animation: none; } }

/* niveles: no quitan funciones, solo cambian cuánta explicación ves */
body.nv-intermedio .head .lede, body.nv-avanzado .head .lede { display: none; }
body.nv-avanzado .hint.ex, body.nv-avanzado .card > p.hint:first-of-type { display: none; }
body.rol-taller #pd-nuevo, body.rol-taller #pn-nuevo { display: none; }
.qc { display: grid; gap: 8px; background: var(--soft); border-radius: 14px; padding: 12px 14px; }
.qc label { color: var(--ink); font-weight: 600; }
.prov { border-bottom: 1px solid var(--line); }
.prov:last-child { border-bottom: 0; }
.pvd { display: grid; gap: 10px; padding: 4px 0 14px; }
#tar-list .ci.hecha b { text-decoration: line-through; color: var(--muted); }
.arranque { border: 2px solid var(--green); }
.arr { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: a; }
.arr li { display: grid; gap: 8px; counter-increment: a; padding-left: 40px; position: relative; margin: 0; }
.arr li::before { content: counter(a); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 800; }
.arr li.ok::before { content: "✓"; background: var(--green); color: #fff; }
.arr li.ok .row { display: none; }
.arr li.ok b { color: var(--muted); text-decoration: line-through; }
.cz-vis { margin-top: 12px; }
.cz-vis canvas { display: block; width: 100%; height: 240px; border-radius: 14px; background: var(--soft); touch-action: none; cursor: grab; }
.cz-vis .hint { margin: 8px 0 0; }
