/* Panel del comercio — Tu página: Personalizar, Códigos QR y Extensiones */

/* ===== Personalizar ===== */
.hello-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pulse-save { animation: pulseSave 1.6s ease-in-out infinite; }
@keyframes pulseSave { 0%,100% { box-shadow: 0 6px 16px rgba(226,85,45,.28); } 50% { box-shadow: 0 0 0 7px var(--tomate-s), 0 6px 16px rgba(226,85,45,.28); } }
.custom { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.custom-ctl { display: grid; gap: 16px; }
.custom-prev { position: sticky; top: 86px; }
.custom-prev .phone { width: 330px; height: 660px; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--tinta-2); margin: 16px 0 8px; }
.logo-up { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 96px; height: 96px; display: grid; place-items: center; color: #fff; font: 700 26px var(--f-titulo); overflow: hidden; box-shadow: var(--sombra-2); border: 4px solid var(--papel); transition: border-radius .35s var(--ease), background .3s; flex: none; }
.logo-prev img { width: 100%; height: 100%; object-fit: cover; }
.logo-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; min-width: 200px; }
.logo-acts .muted { flex-basis: 100%; }
.logo-acts label { cursor: pointer; }
.banner-up { display: block; position: relative; aspect-ratio: 16 / 7; border-radius: 18px; background: var(--crema-2) center / cover no-repeat; cursor: pointer; overflow: hidden; transition: transform .3s var(--ease); }
.banner-up::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(42,28,20,.45)); }
.banner-up:hover { transform: scale(1.01); }
.banner-cta { position: absolute; right: 12px; bottom: 12px; z-index: 1; display: inline-flex; gap: 6px; align-items: center; background: rgba(255,255,255,.92); padding: 8px 14px; border-radius: 99px; font-weight: 600; font-size: 13.5px; }
.banner-gal { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.banner-gal button { border-radius: 12px; overflow: hidden; outline: 3px solid transparent; outline-offset: 2px; transition: outline-color .2s, transform .2s var(--ease); }
.banner-gal button:hover { transform: translateY(-2px); }
.banner-gal button.on { outline-color: var(--tinta); }
.banner-gal .ph { aspect-ratio: 4 / 3; }
.banner-gal .ph::before { font-size: 18px; }
.swatches { flex-wrap: wrap; }
.sw-custom { position: relative; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 2px dashed var(--linea-2); color: var(--tinta-2); cursor: pointer; }
.sw-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.hex-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; max-width: 220px; }
.hex-dot { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.hex-row .input { padding: 9px 12px; font-family: ui-monospace, Consolas, monospace; text-transform: uppercase; }
.fondos { display: flex; gap: 8px; flex-wrap: wrap; }
.fondos button, .fuentes button { border: 1.5px solid var(--linea-2); background: var(--papel); border-radius: 14px; transition: all .2s var(--ease); }
.fondos button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; font-weight: 600; font-size: 14px; }
.fondos i { width: 24px; height: 24px; border-radius: 8px; border: 1px solid; }
.fondos button.on, .fuentes button.on { border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta); }
.fuentes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.fuentes button { display: grid; gap: 2px; padding: 14px; text-align: left; }
.fuentes b { font-size: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fuentes span { font-size: 12px; color: var(--tinta-2); }
.prev-fab { display: none; }
.drawer-prev .drawer-b { padding: 0; }
.drawer-prev iframe { width: 100%; height: 100%; border: 0; display: block; min-height: 70vh; }

/* ===== Códigos QR ===== */
.qr-page { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 16px; align-items: start; }
.qr-prev { position: sticky; top: 86px; }
.qr-out { display: grid; place-items: center; background: var(--crema-2); border-radius: 18px; padding: 18px; min-height: 360px; }
.qr-img { max-width: 100%; max-height: 520px; border-radius: 14px; box-shadow: var(--sombra-2); animation: pop .45s var(--spring); }
.qr-skel { width: 260px; height: 340px; border-radius: 14px; background: linear-gradient(90deg, var(--crema-2), var(--papel), var(--crema-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.qr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0 8px; }
.seg-full { display: flex; width: 100%; }
.seg-full button { flex: 1; justify-content: center; }
[hidden] { display: none !important; }

/* ===== Extensiones ===== */
.ap-banner .ap-ic img { width: 30px; height: 30px; animation: none; }
.ap-banner.off { background: linear-gradient(120deg, #24365c, #3a6fb8); }
.biz-switch .bl { overflow: hidden; }
.biz-switch .bl img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.ext-hero { display: flex; align-items: center; gap: 18px; border: 2px solid transparent; transition: border-color .3s; }
.ext-hero.is-on { border-color: #1ec99a; }
.ext-logo { width: 68px; height: 68px; border-radius: 18px; flex: none; box-shadow: var(--sombra-1); }
.ext-txt { flex: 1; display: grid; gap: 6px; justify-items: start; }
.ext-txt h3 { font-size: 22px; }
.ext-txt p { font-size: 14px; }
.switch.big { transform: scale(1.25); margin-right: 6px; }
.net-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.net-ig { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); } .net-fb { background: #1877F2; } .net-tt { background: #111; }
.net-th { background: #333; } .net-yt { background: #FF0000; } .net-tg { background: #229ED9; }
.li.prox .ph { width: 46px; height: 46px; border-radius: 12px; flex: none; }
.li.prox .ph::before { font-size: 18px; }
.ext-open { display: grid; justify-items: start; gap: 10px; align-content: start; background: linear-gradient(150deg, #0f1e3d, #1f6fd6); color: #fff; }
.ext-open .muted { color: rgba(255,255,255,.75); }
.ext-open h3 { font-size: 21px; }
.ext-open-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 22px; color: #7CF2CF; }
.ext-k { font-size: 18px; margin: 26px 0 12px; }
.ext-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ext-mini { display: grid; gap: 6px; justify-items: start; }
.ext-mini .ib { width: 40px; height: 40px; border-radius: 12px; background: var(--crema); color: var(--tomate); display: grid; place-items: center; font-size: 19px; }

@media (max-width: 1100px) {
  .custom, .qr-page { grid-template-columns: 1fr; }
  .custom-prev { display: none; }
  .prev-fab { display: inline-flex; position: fixed; right: 16px; bottom: 24px; z-index: 55; box-shadow: var(--sombra-3); }
  .qr-prev { position: static; }
  .ext-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .prev-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .banner-gal { grid-template-columns: repeat(3, 1fr); }
  .fuentes b { font-size: 16px; }
  .hello-btns { width: 100%; }
  .hello-btns .btn { flex: 1; }
  .ext-hero { flex-wrap: wrap; }
  .ext-txt { flex-basis: calc(100% - 90px); }
  .qr-out { min-height: 280px; padding: 12px; }
  .qr-img { max-height: 420px; }
  .seg-full button { padding: 0 8px; font-size: 13px; }
}

.admin-qr { display: grid; grid-template-columns: 190px 1fr; gap: 14px; }
.admin-qr .qr-out { padding: 10px; }

/* POS como complemento */
.pos-logo { display: grid; place-items: center; background: linear-gradient(135deg, var(--tinta), #5a4031); color: #fff; font-size: 32px; }
.pos-acts { display: grid; gap: 8px; justify-items: stretch; }
.pos-sync-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.pos-addon { display: flex; gap: 18px; align-items: center; border: 2px solid var(--tinta); }
.pos-addon > div:nth-child(2) { flex: 1; }
.pos-addon-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--tinta); color: #fff; display: grid; place-items: center; font-size: 30px; flex: none; }
.pos-addon-n { display: grid; justify-items: center; text-align: center; min-width: 110px; }
.pos-addon-n b { font: 700 34px var(--f-titulo); }
.pos-addon-n span { font-size: 12px; color: var(--tinta-2); }
@media (max-width: 1100px) { .pos-sync-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .pos-addon { flex-wrap: wrap; } .pos-acts { width: 100%; grid-template-columns: 1fr 1fr; } }

.sync-note { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: 18px; background: #E3EEFC; color: #1c4f96; }
.sync-note > svg { font-size: 22px; flex: none; }
.sync-note div { flex: 1; display: grid; gap: 2px; font-size: 13.5px; }
.sync-note b { font-size: 14.5px; }
@media (max-width: 640px) { .sync-note { flex-wrap: wrap; } .sync-note .btn { width: 100%; } }

/* Redes en Personalizar */
.redes-list { display: grid; gap: 8px; }
.red-row { display: grid; grid-template-columns: 40px 150px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 6px; border-radius: 14px; transition: background .2s; }
.red-row:not(.lleno) .red-ic { filter: grayscale(1); opacity: .45; }
.red-row.lleno { background: var(--crema); }
.red-n { font-weight: 600; font-size: 14px; }
.red-row .input { padding: 10px 12px; }
.red-test { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--tinta-3); background: var(--crema-2); }
.red-test.on { background: var(--tinta); color: #fff; }
@media (max-width: 640px) { .red-row { grid-template-columns: 40px minmax(0, 1fr) 38px; } .red-n { display: none; } }

/* Explicación del QR por mesa */
.qr-how { margin-top: 16px; }
.qr-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: paso; }
.qr-step { position: relative; background: var(--crema); border-radius: 18px; padding: 16px; display: grid; gap: 6px; align-content: start; }
.qr-step .em { font-size: 30px; }
.qr-step b { font-size: 15px; }
.qr-step span { font-size: 13px; color: var(--tinta-2); }
.qr-step::before { counter-increment: paso; content: counter(paso); position: absolute; top: 12px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--tomate); color: #fff; font: 700 12px/24px var(--f-texto); text-align: center; }
.qr-vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.qr-vs div { border-radius: 16px; padding: 14px 16px; font-size: 13.5px; border: 1.5px solid var(--linea-2); }
.qr-vs div.si { border-color: var(--albahaca); background: var(--albahaca-s); }
.qr-vs b { display: block; margin-bottom: 4px; font-size: 14.5px; }
@media (max-width: 1100px) { .qr-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .qr-steps, .qr-vs { grid-template-columns: 1fr; } }

.ap-addon { border-color: #1f6fd6; }
.ap-addon .pos-addon-ic { background: #0f1e3d; }
.ap-addon .pos-addon-ic img { width: 38px; height: 38px; }
.plan ul { align-content: start; }

/* ===== Plato del día ===== */
.dia { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.dia-ctl { display: grid; gap: 16px; }
.dia-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.dia-g + .dia-g { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--linea); }
.dia-gh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.dia-gh b { font-size: 15px; }
.dia-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.dchip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--linea-2); background: var(--papel); font-weight: 600; font-size: 14.5px; color: var(--tinta-2); transition: all .2s var(--ease); }
.dchip small { font-size: 11.5px; font-weight: 700; color: var(--tomate-d); background: var(--tomate-s); padding: 1px 7px; border-radius: 99px; }
.dchip.on { background: var(--albahaca); border-color: var(--albahaca); color: #fff; animation: pop .3s var(--spring); }
.dchip.on small { background: rgba(255,255,255,.22); color: #fff; }
.dchip.edit { border-style: dashed; color: var(--tinta); }
.dchip.add { border-style: dashed; color: var(--tinta-3); background: none; }
.dchip:active { transform: scale(.95); }
.dia-prev { position: sticky; top: 86px; }
.dia-tpls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dia-tpls button { display: grid; justify-items: center; gap: 6px; padding: 10px 6px; border-radius: 14px; border: 1.5px solid var(--linea-2); background: var(--papel); font-weight: 600; font-size: 13px; }
.dia-tpls button.on { border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta); }
.dia-tpls i { width: 44px; height: 54px; border-radius: 8px; }
.tpl-pizarra { background: #22302A; box-shadow: inset 0 0 0 4px #8A5A2B; }
.tpl-mantel { background: repeating-conic-gradient(var(--tomate) 0 25%, #FFF8EF 0 50%) 0 0 / 12px 12px; box-shadow: inset 0 10px 0 #FFF8EF, inset 0 -10px 0 #FFF8EF; }
.tpl-marca { background: linear-gradient(135deg, var(--tomate), var(--azafran)); }
.dia-img { margin-top: 14px; display: grid; place-items: center; background: var(--crema-2); border-radius: 18px; padding: 14px; min-height: 300px; }
.dia-img img { width: 100%; border-radius: 10px; box-shadow: var(--sombra-2); animation: fadeIn .3s; }
.dia-img.f-historia img { max-width: 260px; }
.dia-img.f-post img { max-width: 300px; }
.dia-img.f-cuadrado img { max-width: 330px; }
.dia-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dia-ap { grid-column: 1 / -1; background: #0f1e3d; }
.dia-ap[disabled] { opacity: .45; }
@media (max-width: 1100px) {
  .dia { grid-template-columns: 1fr; }
  .dia-prev { position: static; }
}
@media (max-width: 860px) {
  .dchip { min-height: 46px; font-size: 15px; }
  .dia-img.f-historia img { max-width: 230px; }
}
.tpl-madera { background: repeating-linear-gradient(180deg, #8A5630 0 12px, #6E4220 12px 13px, #7A4A24 13px 25px, #5c371a 25px 26px); }
.dia-tpls { grid-template-columns: repeat(4, 1fr) !important; }

/* 6 plantillas: 3 por fila */
.dia-tpls { grid-template-columns: repeat(3, 1fr) !important; }
.dia-tpls button { font-size: 12.5px; text-align: center; line-height: 1.2; }
.tpl-caliente { background: linear-gradient(180deg, #B71F14 0 55%, #F26A1B 55% 70%, #FFC23A 70% 80%, #F26A1B 80%); }
.tpl-lento { background: radial-gradient(circle at 50% 110%, rgba(255,140,40,.9), rgba(200,60,20,.4) 40%, #17100D 70%); }
.tpl-madera { background: linear-gradient(90deg, #B57744, #CF9864 50%, #B07240) !important; border: 4px solid #2B221E; border-radius: 14px 14px 8px 8px; position: relative; }
.tpl-madera::after { content: ""; position: absolute; top: 3px; left: 50%; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: #2B221E; }
