:root{
  --bg:#f4f5f7; --surface:#fff; --surface-2:#f8f9fb; --text:#111827; --muted:#6b7280; --line:#e5e7eb;
  --brand:#4f46e5; --brand-ink:#fff;
  --ok:#15803d; --ok-soft:#dcfce7; --warn:#b45309; --warn-soft:#fef3c7;
  --bad:#b91c1c; --bad-soft:#fee2e2; --info:#1d4ed8; --info-soft:#dbeafe;
  --r:14px; --r-sm:10px; --shadow:0 1px 2px rgba(16,24,40,.05),0 6px 20px rgba(16,24,40,.06);
}
:root,.themed{--brand-soft:color-mix(in srgb,var(--brand) 12%,#fff)}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-font-smoothing:antialiased}
body.noscroll{overflow:hidden}
img{display:block;max-width:100%}
button,input,select,textarea{font:inherit;color:inherit}
a{color:var(--brand)}
h1,h2,h3,h4{margin:0;line-height:1.2}
h1{font-size:24px}h2{font-size:19px}h3{font-size:16px}
.ic{flex:none}
.muted{color:var(--muted)}.sm{font-size:13px}.xs{font-size:12px}.strong{font-weight:600}
.ellip{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grow{flex:1}.minw0{min-width:0}
.row{display:flex;align-items:center;gap:10px}.row.wrap{flex-wrap:wrap}.between{justify-content:space-between}
.gap4{gap:4px}
.stack{display:flex;flex-direction:column;gap:12px}
.mt8{margin-top:8px}.mt16{margin-top:16px}.mt24{margin-top:24px}
.right{text-align:right}
.num{font-variant-numeric:tabular-nums}
.c-bad{color:var(--bad)}.c-ok{color:var(--ok)}.c-warn{color:var(--warn)}
.strike{text-decoration:line-through;color:var(--muted)}
:focus-visible{outline:2px solid var(--brand);outline-offset:2px}

/* Botones */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 16px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface);font-weight:600;cursor:pointer;text-decoration:none;color:var(--text);white-space:nowrap;transition:background .15s,border-color .15s,filter .15s}
.btn:hover{background:var(--surface-2)}
.btn:active{transform:translateY(1px)}
.btn:disabled{opacity:.5;cursor:not-allowed;transform:none}
.btn.primary{background:var(--brand);border-color:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{filter:brightness(1.07)}
.btn.danger{color:var(--bad);border-color:#fecaca}
.btn.danger.solid{background:var(--bad);color:#fff;border-color:var(--bad)}
.btn.ghost{background:transparent;border-color:transparent}
.btn.ghost:hover{background:rgba(0,0,0,.05)}
.btn.sm{height:34px;padding:0 12px;font-size:14px}
.btn.lg{height:48px;font-size:16px}
.btn.block{width:100%}
.btn.icon{width:40px;padding:0}
.btn.sm.icon{width:34px}
.btn.wa{background:#25d366;border-color:#25d366;color:#fff}
.linkbtn{background:none;border:0;padding:4px 6px;color:var(--brand);font-weight:600;cursor:pointer;font-size:13px;border-radius:6px}
.linkbtn:hover{background:var(--brand-soft)}

/* Formularios */
.field{display:flex;flex-direction:column;gap:6px}
.field>span{font-size:13px;font-weight:600;color:#374151}
.input{width:100%;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);outline:none}
textarea.input{height:auto;min-height:72px;padding:10px 12px;resize:vertical}
.input:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
input[type=color].input{padding:4px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hint{font-size:12px;color:var(--muted)}
.prefix{position:relative}
.prefix>i{position:absolute;left:12px;top:50%;transform:translateY(-50%);font-style:normal;color:var(--muted)}
.prefix>.input{padding-left:26px}
.switch{display:flex;align-items:flex-start;gap:12px;cursor:pointer;padding:10px 0}
.switch input{appearance:none;-webkit-appearance:none;flex:none;width:44px;height:26px;border-radius:99px;background:#d1d5db;position:relative;cursor:pointer;transition:background .2s;margin:0}
.switch input::after{content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .2s}
.switch input:checked{background:var(--brand)}
.switch input:checked::after{transform:translateX(18px)}
.switch b{display:block;font-weight:600}
.switch small{display:block;color:var(--muted);font-size:13px;margin-top:2px}
.sub-settings{padding-left:56px}
.sub-settings.off{opacity:.45;pointer-events:none}

/* Tarjetas, chips, badges */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:16px}
.card.pad0{padding:0;overflow:hidden}
.card>h3{margin-bottom:12px}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:34px;padding:0 14px;border-radius:99px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:14px;cursor:pointer;color:#374151}
.chip .n{opacity:.6;margin-left:4px}
.chip.on{background:var(--text);border-color:var(--text);color:#fff}
.badge{display:inline-flex;align-items:center;gap:4px;height:22px;padding:0 8px;border-radius:99px;font-size:12px;font-weight:700;background:#f1f2f4;color:#374151;white-space:nowrap}
.b-new{background:var(--info-soft);color:var(--info)}
.b-ok{background:var(--ok-soft);color:var(--ok)}
.b-done{background:#ede9fe;color:#6d28d9}
.b-bad{background:var(--bad-soft);color:var(--bad)}
.b-warn{background:var(--warn-soft);color:var(--warn)}
.dot{min-width:20px;height:20px;padding:0 6px;border-radius:99px;background:var(--bad);color:#fff;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.thumb{width:44px;height:44px;border-radius:10px;object-fit:cover;background:var(--surface-2);flex:none}
.thumb.lg{width:56px;height:56px}
.zoomable{cursor:zoom-in}
.logo{width:36px;height:36px;border-radius:10px;background:var(--brand);color:#fff;display:grid;place-items:center;font-weight:800;flex:none}
.avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;font-weight:700;flex:none}
.notice{display:block;padding:10px 12px;border-radius:10px;font-size:13px;line-height:1.45}
.notice.warn{background:var(--warn-soft);color:#78350f}
.notice.info{background:var(--info-soft);color:#1e3a8a}
.notice.ok{background:var(--ok-soft);color:#14532d}
.notice.bad{background:var(--bad-soft);color:#7f1d1d}
.empty{padding:32px 16px;text-align:center;color:var(--muted)}
.empty .ic{margin:0 auto 8px;opacity:.45}

/* Layout admin */
.admin{display:flex;min-height:100vh}
.sidenav{width:236px;flex:none;background:var(--surface);border-right:1px solid var(--line);padding:16px 12px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column;gap:2px}
.brandbox{display:flex;align-items:center;gap:10px;padding:6px 8px 18px}
.sidenav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;color:#374151;text-decoration:none;font-weight:600}
.sidenav a:hover{background:var(--surface-2)}
.sidenav a.on{background:var(--brand-soft);color:var(--brand)}
.sidenav a .dot{margin-left:auto}
.sidenav .spacer{flex:1}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;height:60px;padding:0 20px;background:rgba(244,245,247,.88);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.topbar h1{font-size:20px}
.view{padding:20px;width:100%;max-width:1100px;margin:0 auto}
.bottomnav{display:none}
@media (max-width:760px){
  .sidenav{display:none}
  .topbar{padding:0 12px 0 16px}
  .view{padding:16px 16px 96px}
  .bottomnav{display:flex;position:fixed;z-index:30;left:0;right:0;bottom:0;background:var(--surface);border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
  .bottomnav a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:11px;font-weight:600;color:var(--muted);text-decoration:none;padding:4px 0;position:relative}
  .bottomnav a.on{color:var(--brand)}
  .bottomnav .dot{position:absolute;top:-2px;left:calc(50% + 4px);min-width:18px;height:18px}
  .grid2{grid-template-columns:1fr}
  .hide-sm{display:none!important}
  .sub-settings{padding-left:0}
}

/* Toolbar y listas */
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:12px}
.search{position:relative;flex:1;min-width:180px}
.search .ic{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--muted);pointer-events:none}
.search .input{padding-left:38px}
.li{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.li:last-child{border-bottom:0}
.li.click{cursor:pointer}
.li.click:hover{background:var(--surface-2)}
.li-actions{display:flex;gap:6px;margin-left:auto}
@media (max-width:560px){.li.wrap{flex-wrap:wrap}.li.wrap .li-actions{width:100%;padding-left:52px}}

/* Dashboard */
.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
@media (max-width:900px){.kpis{grid-template-columns:repeat(2,1fr)}}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;min-width:0}
.kpi .k-label{font-size:13px;color:var(--muted);font-weight:600}
.kpi .k-val{font-size:24px;font-weight:800;margin-top:4px;font-variant-numeric:tabular-nums;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.kpi .k-sub{font-size:12px;color:var(--muted);margin-top:2px}
@media (max-width:420px){.kpi .k-val{font-size:20px}}
.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
@media (max-width:900px){.dash-grid{grid-template-columns:1fr}}
.card .card-sub{font-size:12px;color:var(--muted);margin:-8px 0 14px}
.bars{display:flex;flex-direction:column;gap:12px}
.bar-top{display:flex;justify-content:space-between;gap:8px;font-size:14px;margin-bottom:5px}
.bar-track{height:8px;border-radius:99px;background:#eef0f3;overflow:hidden}
.bar-fill{height:100%;border-radius:99px;background:var(--brand)}
.bar-fill.warn{background:#f59e0b}
.bar-fill.ok{background:#22c55e}

/* Productos (admin) */
.prow{display:grid;grid-template-columns:56px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);cursor:pointer}
.prow:hover{background:var(--surface-2)}
.prow:last-child{border-bottom:0}
.pstats{display:flex;gap:20px;text-align:right}
.pstats>div{min-width:62px}
.prow.inactive>img,.prow.inactive>.minw0{opacity:.5}
@media (max-width:760px){.prow{grid-template-columns:56px minmax(0,1fr)}.pstats{grid-column:2;justify-content:flex-start;text-align:left;gap:18px}.pstats>div{min-width:0}}
.imgpick{display:flex;gap:14px;align-items:center}
.imgpick img{width:96px;height:96px;border-radius:12px;object-fit:cover;border:1px solid var(--line)}
.tier-row{display:grid;grid-template-columns:1fr 1fr 40px;gap:8px;align-items:end}

/* Pedido (admin) */
.detail-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start}
@media (max-width:900px){.detail-grid{grid-template-columns:1fr}}
.sticky-side{position:sticky;top:76px}
@media (max-width:900px){.sticky-side{position:static}}
.oline{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 16px;border-bottom:1px solid var(--line);transition:background .15s}
.oline:last-child{border-bottom:0}
.oline.is-out{background:#fff5f5}
.oline.is-out .oname{text-decoration:line-through;color:var(--muted)}
.oline.is-partial{background:#fffbeb}
.ofull{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
@media (max-width:560px){.oline{grid-template-columns:56px minmax(0,1fr)}.ofull{grid-column:1/-1;flex-direction:row;align-items:center;justify-content:space-between}}
.stepper{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);overflow:hidden;height:38px}
.stepper button{width:38px;height:100%;border:0;background:none;cursor:pointer;display:grid;place-items:center;color:var(--text);flex:none}
.stepper button:hover{background:var(--surface-2)}
.stepper button:disabled{opacity:.3;cursor:not-allowed}
.stepper input{width:48px;min-width:0;flex:1;height:100%;text-align:center;border:0;outline:none;font-weight:700;font-variant-numeric:tabular-nums;background:transparent;-moz-appearance:textfield;appearance:textfield}
.stepper input::-webkit-outer-spin-button,.stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.stepper.sm{height:34px}.stepper.sm button{width:34px}
.totals{display:flex;flex-direction:column;gap:6px}
.t-row{display:flex;justify-content:space-between;gap:12px}
.t-big{font-size:19px;font-weight:800;margin-top:4px}

/* Modal */
.modal-wrap{position:fixed;inset:0;z-index:100;background:rgba(17,24,39,.5);display:flex;align-items:center;justify-content:center;padding:16px;animation:fade .15s}
.modal{background:var(--surface);border-radius:18px;width:100%;max-width:520px;max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.25);animation:pop .18s ease-out}
.modal.wide{max-width:680px}
.m-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px 14px 20px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--surface);z-index:2}
.m-body{padding:20px;display:flex;flex-direction:column;gap:14px}
.m-foot{display:flex;gap:10px;justify-content:flex-end;align-items:center;padding:14px 20px;border-top:1px solid var(--line);position:sticky;bottom:0;background:var(--surface);z-index:2}
@media (max-width:560px){
  .modal-wrap{align-items:flex-end;padding:0}
  .modal,.modal.wide{max-width:none;border-radius:18px 18px 0 0;max-height:94vh;animation:up .22s ease-out}
  .m-foot{padding-bottom:calc(14px + env(safe-area-inset-bottom))}
}
@keyframes fade{from{opacity:0}}
@keyframes pop{from{transform:scale(.97);opacity:0}}
@keyframes up{from{transform:translateY(40px);opacity:.4}}

/* Toast */
#toasts{position:fixed;z-index:300;left:50%;transform:translateX(-50%);bottom:24px;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;width:calc(100% - 32px);max-width:440px}
.toast{background:#111827;color:#fff;padding:12px 16px;border-radius:12px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.2);animation:up .2s ease-out;text-align:center}
.toast.bad{background:var(--bad)}
.toast.ok{background:var(--ok)}
@media (max-width:760px){#toasts{bottom:96px}}

/* Inicio / selección de tienda */
.home{max-width:780px;margin:0 auto;padding:32px 16px 48px}
.hero{display:flex;align-items:center;gap:14px;margin-bottom:28px}
.hero .logo{width:52px;height:52px;font-size:22px;border-radius:14px}
.store-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.store-card{display:flex;align-items:center;gap:12px;padding:16px;border:1px solid var(--line);border-radius:var(--r);background:var(--surface);cursor:pointer;text-align:left}
.store-card:hover{border-color:#c7cbd3;box-shadow:var(--shadow)}
.pin-box{max-width:380px;margin:12vh auto 0;padding:0 16px}

/* Tienda del cliente */
.shop{min-height:100vh;padding-bottom:110px}
.shop-head{background:var(--brand);color:#fff;padding:20px 16px 0}
.shop-head .inner{max-width:1100px;margin:0 auto}
.shop-head h1{font-size:22px}
.shop-head .hello{opacity:.9;margin-top:2px}
.head-btn{background:rgba(255,255,255,.18)!important;border-color:transparent!important;color:#fff!important}
.tabs{display:flex;gap:4px;margin-top:16px}
.tab{background:none;border:0;color:rgba(255,255,255,.85);font-weight:700;padding:10px 16px;border-radius:12px 12px 0 0;cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.tab.on{background:var(--bg);color:var(--text)}
.tab .dot{background:#fff;color:var(--brand)}
.tab.on .dot{background:var(--brand);color:#fff}
.shop-body{max-width:1100px;margin:0 auto;padding:0 16px 16px}
.shop-tools{position:sticky;top:0;z-index:10;background:var(--bg);padding:14px 0 10px;display:flex;flex-direction:column;gap:10px}
.cat-title{margin:18px 0 10px;font-size:18px}
.pgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
@media (max-width:440px){.pgrid{grid-template-columns:1fr 1fr;gap:10px}}
.pcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.pimg{position:relative;display:block;padding:0;border:0;background:var(--surface-2);cursor:zoom-in;aspect-ratio:1/1;width:100%}
.pimg img{width:100%;height:100%;object-fit:cover}
.ribbon{position:absolute;top:8px;left:8px;background:var(--bad);color:#fff;font-size:11px;font-weight:800;padding:3px 8px;border-radius:99px;letter-spacing:.03em}
.pcard.is-out .pimg img{filter:grayscale(.85);opacity:.65}
.pbody{padding:10px 12px 12px;display:flex;flex-direction:column;gap:3px;flex:1}
.pname{font-weight:600;line-height:1.25;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.pprice{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.pprice b{font-size:17px}
.pprice s{color:var(--muted);font-size:13px}
.tierhint{font-size:12px;color:var(--ok);font-weight:600}
.avail{font-size:12px;color:var(--muted)}
.avail.out{color:var(--bad);font-weight:600}
.avail.bo{color:var(--warn);font-weight:600}
.pctrl{margin-top:auto;padding-top:8px}
.pctrl .stepper{width:100%}
.cartbar{position:fixed;left:0;right:0;bottom:0;z-index:40;padding:12px 16px calc(12px + env(safe-area-inset-bottom));pointer-events:none}
.cartbar .btn{pointer-events:auto;max-width:560px;margin:0 auto;display:flex;width:100%;height:56px;border-radius:16px;box-shadow:0 10px 30px rgba(0,0,0,.22);justify-content:space-between;font-size:16px}
.cartline{display:grid;grid-template-columns:56px minmax(0,1fr);gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.cartline:first-child{padding-top:0}
.viewer img.big{width:100%;max-height:58vh;object-fit:contain;background:var(--surface-2);border-radius:12px}
.tier-table{width:100%;border-collapse:collapse;font-size:14px}
.tier-table td{padding:7px 0;border-bottom:1px dashed var(--line)}
.tier-table td:last-child{text-align:right;font-weight:700}
.order-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);overflow:hidden;margin-top:12px}
.oc-head{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line)}
.oc-body{padding:4px 16px}
.oc-foot{padding:12px 16px;background:var(--surface-2);border-top:1px solid var(--line)}
.ocl{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px dashed var(--line);font-size:14px}
.ocl:last-child{border-bottom:0}
.success{text-align:center;padding:28px 20px 8px}
.success .check{width:64px;height:64px;border-radius:50%;background:var(--ok-soft);color:var(--ok);display:grid;place-items:center;margin:0 auto 14px}

/* Galería de fotos (admin) */
.gallery{display:flex;flex-wrap:wrap;gap:10px}
.gal-item{position:relative;width:84px;height:84px}
.gal-item img{width:100%;height:100%;object-fit:cover;border-radius:12px;border:1px solid var(--line);cursor:pointer}
.gal-item.main img{outline:3px solid var(--brand);outline-offset:-3px}
.gal-item.main::after{content:"Principal";position:absolute;left:4px;bottom:4px;background:var(--brand);color:#fff;font-size:10px;font-weight:700;padding:1px 6px;border-radius:99px}
.gal-x{position:absolute;top:-6px;right:-6px;width:24px;height:24px;border-radius:50%;border:0;background:#111827;color:#fff;display:grid;place-items:center;cursor:pointer}
.gal-add{width:84px;height:84px;border:2px dashed var(--line);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;color:var(--muted);cursor:pointer}
.gal-add:hover{border-color:var(--brand);color:var(--brand)}
.vtable{border:1px solid var(--line);border-radius:var(--r-sm);padding:10px 12px;display:flex;flex-direction:column;gap:6px;max-height:300px;overflow:auto}
.vtable .input{width:96px;height:36px;flex:none}

/* Pagos */
.pay-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-top:1px solid var(--line)}
.pay-ic{display:grid;place-items:center;color:var(--ok);background:var(--ok-soft)}

/* Tienda: opciones, fotos, entrega */
.optchip{min-width:44px;height:38px;padding:0 14px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-weight:600;cursor:pointer}
.optchip:hover{border-color:var(--text)}
.optchip.on{border-color:var(--brand);background:var(--brand-soft);color:var(--brand);box-shadow:inset 0 0 0 1px var(--brand)}
.optchip.out{color:var(--muted);text-decoration:line-through}
.thumbs{display:flex;gap:8px;overflow-x:auto}
.thumbs .thumb{cursor:pointer;opacity:.6;border:2px solid transparent}
.thumbs .thumb.on{opacity:1;border-color:var(--brand)}
.imgcount{position:absolute;right:8px;bottom:8px;background:rgba(17,24,39,.7);color:#fff;font-size:11px;font-weight:700;padding:2px 7px;border-radius:99px;display:inline-flex;align-items:center;gap:3px}
.radio-card{display:flex;gap:10px;align-items:flex-start;text-align:left;padding:12px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);cursor:pointer}
.radio-card b{display:block;font-size:14px}.radio-card small{display:block;color:var(--muted);font-size:12px}
.radio-card.on{border-color:var(--brand);background:var(--brand-soft);box-shadow:inset 0 0 0 1px var(--brand)}
.head-chip{background:rgba(255,255,255,.22);padding:1px 8px;border-radius:99px;font-size:12px;font-weight:700}
code{background:#eef0f3;padding:1px 5px;border-radius:5px;font-size:12px}

/* Instalar app: solo cuando el navegador lo permite */
.install-btn{display:none!important}
.can-install .install-btn{display:inline-flex!important}

.spinner{width:32px;height:32px;margin:0 auto 12px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--brand);animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.save-state{font-size:12px;color:var(--muted);white-space:nowrap}

.mobile-switch{display:none}
@media (max-width:760px){.mobile-switch{display:inline-flex}}

@media print{
  .sidenav,.bottomnav,.topbar,.no-print,#toasts{display:none!important}
  body{background:#fff}.view{padding:0;max-width:none}
  .detail-grid{grid-template-columns:1fr}.card{border:0}
}
