/* Paneles (comercio y admin) */
body { background: var(--crema); }
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }

/* Barra lateral */
.side { background: var(--tinta); color: #E9DCCD; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; z-index: 70; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--tomate), var(--azafran)); display: grid; place-items: center; color: #fff; font: 700 18px var(--f-titulo); }
.brand b { font-family: var(--f-titulo); font-size: 20px; color: #fff; display: block; line-height: 1; }
.brand small { font-size: 11.5px; color: #A89382; }
.biz-switch { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.06); margin-bottom: 10px; }
.biz-switch .bl { width: 34px; height: 34px; border-radius: 10px; background: var(--tomate); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.biz-switch div { flex: 1; min-width: 0; }
.biz-switch b { display: block; color: #fff; font-size: 14px; }
.biz-switch span { font-size: 12px; color: #A89382; }
.nav-k { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #8C7867; padding: 12px 12px 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 500; font-size: 14.5px; transition: background .2s, color .2s, transform .2s var(--ease); position: relative; }
.nav a svg { font-size: 18px; opacity: .8; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px); }
.nav a.on { background: var(--tomate); color: #fff; box-shadow: 0 6px 16px rgba(226,85,45,.35); }
.nav a.on svg { opacity: 1; }
.nav .cnt { margin-left: auto; background: rgba(255,255,255,.14); font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.nav a.on .cnt { background: rgba(255,255,255,.25); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; font-size: 13px; }
.side-foot .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--azafran); color: var(--tinta); display: grid; place-items: center; font-weight: 700; }
.side-foot div { flex: 1; }
.side-foot b { color: #fff; display: block; }

/* Área principal */
.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(255,248,239,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--linea); }
.top h1 { font-size: 24px; flex: 1; }
.top .burger { display: none; }
.view { padding: 24px 28px 60px; max-width: 1280px; }
.view > * { animation: rise .5s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .05s; } .view > *:nth-child(3) { animation-delay: .1s; } .view > *:nth-child(4) { animation-delay: .15s; } .view > *:nth-child(5) { animation-delay: .2s; }

.hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hello h2 { font-size: 28px; }
.hello p { color: var(--tinta-2); }

/* KPIs en una línea */
.kpis { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--papel); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sombra-1); min-width: 0; }
.kpi-k { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--tinta-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-k svg { color: var(--tomate); font-size: 16px; }
.kpi-v { font-family: var(--f-titulo); font-size: 26px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-d { font-size: 12px; font-weight: 600; color: var(--albahaca); }
.kpi-d.down { color: var(--chile); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1.6fr 1fr; }
.g2e { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--papel); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sombra-1); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 18px; }
.card-h .muted { font-size: 13px; }

/* Gráfico de barras (una serie) */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding-top: 10px; position: relative; }
.bars::before { content: ""; position: absolute; left: 0; right: 0; bottom: 22px; border-top: 1px solid var(--linea-2); }
.bcol { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; position: relative; cursor: default; }
.bcol .b { width: 100%; max-width: 38px; height: 0; background: var(--tomate-s); border-radius: 4px 4px 0 0; transition: height .9s var(--ease), background .2s; }
.bcol.hoy .b { background: var(--tomate); }
.bcol:hover .b { background: var(--tomate-d); }
.bcol small { font-size: 12px; color: var(--tinta-2); height: 16px; }
.bcol .tip { position: absolute; bottom: calc(var(--h) + 30px); background: var(--tinta); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: all .2s; pointer-events: none; z-index: 2; }
.bcol:hover .tip, .bcol.hoy .tip { opacity: 1; transform: none; }
.bcol:hover ~ .bcol.hoy .tip { opacity: 0; }

/* Listas y tablas */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--linea); }
.li:last-child { border: 0; }
.li .ib { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--crema); font-size: 18px; flex: none; color: var(--tomate); }
.li div.t { flex: 1; min-width: 0; }
.li div.t b { display: block; font-size: 14px; }
.li div.t span { font-size: 12.5px; color: var(--tinta-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--linea-2); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px dashed var(--linea); white-space: nowrap; }
tr:hover td { background: var(--crema); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.st { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st.ok { background: var(--albahaca-s); color: var(--albahaca); }
.st.warn { background: var(--azafran-s); color: #A7650E; }
.st.bad { background: #FCE4E1; color: var(--chile); }
.st.info { background: #E7EEF8; color: #2F5E9E; }
.st.off { background: var(--crema-2); color: var(--tinta-2); }

/* Pedidos: tablero */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--crema-2); border-radius: var(--r-lg); padding: 12px; min-height: 300px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 700; font-size: 14px; }
.col-h .n { background: var(--papel); border-radius: 99px; padding: 0 9px; font-size: 12px; }
.col-h i { width: 9px; height: 9px; border-radius: 50%; }
.order { background: var(--papel); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; box-shadow: var(--sombra-1); animation: rise .4s var(--ease) both; }
.order.leave { animation: leave .3s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(30px) scale(.96); } }
.order-h { display: flex; justify-content: space-between; align-items: center; }
.order-h b { font-size: 15px; }
.order-h .time { font-size: 12px; color: var(--tinta-2); display: inline-flex; gap: 4px; align-items: center; }
.order-h .time.late { color: var(--chile); font-weight: 700; }
.order ul { list-style: none; padding: 0; margin: 8px 0; font-size: 13.5px; color: var(--tinta-2); }
.order-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.order-f .modo { display: grid; gap: 1px; font-size: 12.5px; font-weight: 600; color: var(--tinta-2); white-space: nowrap; }
.order-f .modo span { display: inline-flex; gap: 5px; align-items: center; }
.order-f .modo b { font-size: 15px; color: var(--tinta); }

/* Menú (editor) */
.menu-ed { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.cat-list button { display: flex; justify-content: space-between; width: 100%; padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; transition: background .2s; }
.cat-list button.on { background: var(--tomate-s); color: var(--tomate-d); }
.cat-list button span { color: var(--tinta-3); font-weight: 500; }
.dish-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--linea); }
.dish-row .ph { width: 54px; height: 54px; border-radius: 14px; flex: none; }
.dish-row .ph::before { font-size: 22px; }
.dish-row div.t { flex: 1; min-width: 0; }
.dish-row div.t b { display: block; }
.dish-row div.t span { font-size: 13px; color: var(--tinta-2); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dish-row .price { font-weight: 700; width: 100px; text-align: right; }
.dish-row.off { opacity: .5; }

/* Cajón lateral (drawer) */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--crema); z-index: 90; transform: translateX(105%); transition: transform .45s var(--ease); display: flex; flex-direction: column; box-shadow: var(--sombra-3); }
.drawer.open { transform: none; }
.drawer-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--linea); }
.drawer-h h3 { flex: 1; font-size: 20px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 20px 22px; display: grid; gap: 14px; align-content: start; }
.drawer-f { padding: 14px 22px; border-top: 1px solid var(--linea); display: flex; gap: 10px; justify-content: flex-end; background: var(--papel); }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos .ph, .photos .add { aspect-ratio: 1; border-radius: 12px; }
.photos .add { border: 2px dashed var(--linea-2); display: grid; place-items: center; color: var(--tinta-3); font-size: 22px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--linea); }
.toggle-row:last-child { border: 0; }
.toggle-row b { display: block; font-size: 14px; }
.toggle-row span.muted { font-size: 12.5px; }

/* AutoPost */
.ap-banner { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--r-lg); background: linear-gradient(120deg, #0f1e3d, #1f6fd6); color: #fff; margin-bottom: 16px; position: relative; overflow: hidden; }
.ap-banner::after { content: ""; position: absolute; right: -40px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: rgba(30,201,154,.25); }
.ap-banner .ap-ic { width: 48px; height: 48px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; font-size: 24px; flex: none; }
.ap-banner .ap-ic svg { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ap-banner div { flex: 1; position: relative; z-index: 1; }
.ap-banner b { font-size: 16px; }
.ap-banner p { font-size: 13.5px; opacity: .85; }
.ap-banner .st { background: rgba(30,201,154,.2); color: #7CF2CF; position: relative; z-index: 1; }
.offer-card { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center; }
.offer-card .ph { height: 92px; border-radius: 14px; }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.src.ap { background: #E3EEFC; color: #1f6fd6; }
.src.mm { background: var(--tomate-s); color: var(--tomate-d); }
.nets { display: inline-flex; gap: 4px; }
.net { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.net.ig { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.net.fb { background: #1877F2; }
.net.tt { background: #111; }
.net.mm { background: var(--tomate); }

/* Reseñas, encuestas, lealtad */
.rev { padding: 14px 0; border-bottom: 1px dashed var(--linea); }
.rev:last-child { border: 0; }
.rev-h { display: flex; align-items: center; gap: 10px; }
.rev-h .avatar { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.rev-h div { flex: 1; }
.rev p { margin: 8px 0; font-size: 14px; }
.rev .reply-box { display: flex; gap: 8px; }
.rev .reply-box input { flex: 1; border: 1px solid var(--linea-2); border-radius: 999px; padding: 0 14px; height: 38px; background: var(--crema); outline: none; }
.rev .replied { background: var(--crema); border-left: 3px solid var(--albahaca); padding: 8px 12px; border-radius: 10px; font-size: 13px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 44px; align-items: center; gap: 10px; font-size: 13.5px; padding: 6px 0; }
.hbar div { height: 10px; background: var(--crema-2); border-radius: 99px; overflow: hidden; }
.hbar div span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--tomate); transition: width 1s var(--ease); }
.hbar b { text-align: right; font-variant-numeric: tabular-nums; }
.nps { display: flex; align-items: center; gap: 18px; }
.nps-ring { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--albahaca) calc(var(--p) * 1%), var(--crema-2) 0); position: relative; flex: none; }
.nps-ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--papel); }
.nps-ring b { position: relative; z-index: 1; font-family: var(--f-titulo); font-size: 30px; }
.rw { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--crema); }
.rw .em { font-size: 26px; }
.rw div { flex: 1; }

/* Perfil / vista previa */
.phone { width: 340px; height: 680px; border-radius: 44px; background: var(--tinta); padding: 12px; box-shadow: var(--sombra-3); margin: 0 auto; }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 34px; background: var(--crema); }
.qr { width: 150px; height: 150px; border-radius: 14px; background:
  conic-gradient(from 90deg at 30% 30%, var(--tinta) 25%, transparent 0) 0 0/24px 24px,
  linear-gradient(var(--papel), var(--papel)); border: 10px solid var(--papel); box-shadow: inset 0 0 0 2px var(--linea-2); position: relative; }
.qr::after { content: "F&M"; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); background: var(--tomate); color: #fff; font-weight: 700; font-size: 12px; padding: 6px; border-radius: 8px; }
.swatches { display: flex; gap: 10px; }
.swatches button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--papel); box-shadow: 0 0 0 1px var(--linea-2); transition: transform .2s var(--spring); }
.swatches button.on { box-shadow: 0 0 0 2px var(--tinta); transform: scale(1.1); }
.link-box { display: flex; align-items: center; gap: 8px; background: var(--crema); border-radius: 12px; padding: 6px 6px 6px 14px; font-size: 14px; font-weight: 600; }
.link-box span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Planes */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { background: var(--papel); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sombra-1); border: 2px solid transparent; position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan.hl { border-color: var(--tomate); }
.plan .rib { position: absolute; top: -12px; left: 22px; background: var(--tomate); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.plan h3 { font-size: 22px; }
.plan .pr { font-family: var(--f-titulo); font-size: 32px; font-weight: 700; }
.plan .pr small { font-family: var(--f-texto); font-size: 14px; color: var(--tinta-2); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; font-size: 14px; flex: 1; }
.plan li { display: flex; gap: 8px; }
.plan li svg { color: var(--albahaca); margin-top: 3px; }
.plan li.no { color: var(--tinta-3); }
.plan li.no svg { color: var(--tinta-3); }

.scrim { position: fixed; inset: 0; background: rgba(42,28,20,.42); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 65; }
.scrim.open { opacity: 1; pointer-events: auto; }
.mob-only { display: none; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(var(--n, 5), minmax(150px, 1fr)); overflow-x: auto; scrollbar-width: thin; }
  .g2, .g3, .plans { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-102%); transition: transform .4s var(--ease); }
  .side.open { transform: none; }
  .top { padding: 12px 16px; }
  .top .burger { display: inline-grid; }
  .top h1 { font-size: 20px; }
  .top .hide-m { display: none; }
  .view { padding: 18px 16px 60px; }
  .g2e, .menu-ed { grid-template-columns: 1fr; }
  .mob-only { display: initial; }
  .phone { transform: scale(.85); transform-origin: top center; }
}

/* ===== Celular primero: barra de pestañas, tablas como tarjetas, tablero deslizable ===== */
.tabbar { display: none; }
@media (max-width: 860px) {
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--linea);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button { display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--tinta-3); padding: 4px 0; transition: color .2s; }
  .tabbar .tb-ic { position: relative; width: 52px; height: 30px; border-radius: 99px; display: grid; place-items: center; font-size: 21px; transition: background .3s var(--ease), transform .3s var(--spring); }
  .tabbar .on { color: var(--tomate-d); }
  .tabbar .on .tb-ic { background: var(--tomate-s); color: var(--tomate); transform: translateY(-1px); }
  .tb-dot { position: absolute; top: -2px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--tomate); color: #fff; font: 700 10px/17px var(--f-texto); font-style: normal; }
  .top .burger { display: none; }
  .top { padding: 12px 16px; }
  .view { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: auto; }

  .hello { margin-bottom: 14px; }
  .hello h2 { font-size: 23px; }
  .hello p { font-size: 14px; }
  .kpis { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px 16px; padding: 2px 14px 6px; scrollbar-width: none; }
  .kpis::-webkit-scrollbar { display: none; }
  .kpi { flex: 0 0 auto; min-width: 150px; scroll-snap-align: start; }
  .kpi-v { font-size: 22px; }
  .card { padding: 16px; border-radius: 20px; }
  .bars { height: 170px; gap: 6px; }
  .card-h:has(+ .bars) { margin-bottom: 40px; }

  /* Pedidos: una columna por pantalla, se desliza de lado */
  .board { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 8px; gap: 10px; scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .col { flex: 0 0 86%; scroll-snap-align: center; min-height: 60vh; }
  .hello .seg { max-width: 100%; overflow-x: auto; }

  /* Menú: categorías en fila deslizable */
  .cat-list { display: flex; overflow-x: auto; gap: 6px; padding: 8px !important; scrollbar-width: none; }
  .cat-list button { width: auto; flex: none; gap: 8px; white-space: nowrap; }
  .dish-row { gap: 10px; flex-wrap: wrap; }
  .dish-row div.t { flex: 1 1 calc(100% - 70px); }
  .dish-row .price { width: auto; margin-left: 64px; text-align: left; flex: 1; }

  .hbar { grid-template-columns: 1fr 70px 40px !important; font-size: 13px; }
  .hbar > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .offer-card { grid-template-columns: 86px 1fr; }
  .offer-card .ph { height: 86px; }
  .ap-banner { flex-wrap: wrap; padding: 16px; }
  .ap-banner .st { order: 3; }
  .rw, .toggle-row { gap: 10px; }
  .phone { display: none; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .drawer { width: 100%; border-radius: 24px 24px 0 0; top: 6vh; transform: translateY(105%); }
  .drawer.open { transform: none; }
  .drawer-f { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .drawer-f .btn { flex: 1; }
}

/* Tablas como tarjetas en pantallas angostas */
@media (max-width: 640px) {
  table, tbody { display: block; }
  thead { display: none; }
  tr { display: block; background: var(--papel); border: 1px solid var(--linea); border-radius: 16px; padding: 6px 14px; margin-bottom: 10px; }
  tr:hover td { background: none; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--linea); white-space: normal; text-align: right; }
  td:last-child { border: 0; }
  td::before { content: attr(data-l); font-size: 12px; font-weight: 600; color: var(--tinta-3); text-align: left; flex: none; }
  td[data-l=""]::before { display: none; }
  td[data-l=""] { justify-content: flex-end; }
  td:first-child { font-size: 15px; }
  td.num { text-align: right; }
  .card:has(> .table-wrap), .card > .table-wrap { background: none; box-shadow: none; padding: 0; }
  .card:has(> .table-wrap) { background: none; box-shadow: none; padding: 0; }
}

/* Logo FullMenu en la barra lateral */
.brand { flex-direction: column; align-items: flex-start; gap: 4px; padding: 4px 8px 18px; }
.brand-logo { width: 176px; height: auto; display: block; }
.brand small { padding-left: 4px; letter-spacing: .02em; }

/* ── Admin: editor de planes ── */
.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pl-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.plan.pl-oculto { opacity: .62; border-style: dashed; border-color: var(--linea-2); }
.plan li.no { color: var(--tinta-3); }
.plan li.no svg { color: var(--tinta-3); }
.pl-cars { display: grid; gap: 6px; margin-top: 8px; }
.pl-car { display: grid; grid-template-columns: 36px minmax(0, 1fr) 32px 32px 32px; gap: 4px; align-items: center; }
.pl-car .input { padding: 9px 12px; }
.pl-car .icon-btn { width: 32px; height: 32px; font-size: 16px; color: var(--tinta-2); }
.pl-car .icon-btn:hover { background: var(--crema-2); color: var(--tinta); }
.pl-car .pl-arriba svg { transform: rotate(180deg); }
.pl-si { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; background: var(--albahaca-s); color: var(--albahaca); transition: background .2s, color .2s; }
.pl-car.is-no .pl-si { background: var(--crema-2); color: var(--tinta-3); }
.pl-car.is-no .input { color: var(--tinta-3); text-decoration: line-through; }
.pl-borrar { margin-right: auto; color: var(--chile); }
.pos-addon-n .btn { margin-top: 8px; }

/* ── Panel del comercio: tu plan (lee los planes del admin) ── */
.mi-plan.hl { border: 2px solid var(--tomate); }
.mi-plan-pr { font: 700 30px var(--f-titulo); margin: 10px 0 6px; }
.mi-plan-pr small { font: 500 13.5px var(--f-texto); color: var(--tinta-2); }
.mi-plan-l { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; font-size: 14px; }
.mi-plan-l li { display: flex; gap: 8px; }
.mi-plan-l li svg { color: var(--albahaca); margin-top: 3px; flex: none; }
.mi-plan-l li.no { color: var(--tinta-3); }
.mi-plan-l li.no svg { color: var(--tinta-3); }

/* Admin y panel: ofertas por pago adelantado */
.per-tabla { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.per-col { display: grid; gap: 4px; padding: 14px; border-radius: 14px; background: var(--crema); }
.per-col.off { opacity: .55; }
.per-pct { font: 700 22px var(--f-titulo); color: var(--albahaca); }
.per-col.off .per-pct { color: var(--tinta-3); font-size: 16px; }
.per-fila { gap: 12px; }
.per-in { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.per-in .input { width: 70px; text-align: right; padding: 9px 10px; }

/* Formas de pago (admin y panel del comercio) */
.pag-l { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 12px; }
.pag-i { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--crema); }
.pag-i > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pag-i.off { opacity: .55; }
.pag-i .ib svg, .pag-i .ib .i { color: var(--tomate); }
.pag-filas { display: grid; gap: 10px; margin: 10px 0; }
.pag-fila { display: grid; grid-template-columns: auto minmax(0, 1fr) 34px; gap: 10px; align-items: start; padding: 12px; border-radius: 14px; background: var(--crema); }
.pag-campos { display: grid; gap: 6px; }
.pag-campos .input { padding: 9px 12px; }
.pag-rd { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tinta-2); }
.pag-i .btn { flex: none; }

/* ── Facturación electrónica (panel del comercio y admin) ── */
.fe-pasos { margin-top: 16px; }
.fe-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; counter-reset: p; }
.fe-steps li { position: relative; display: grid; gap: 3px; padding: 12px; border-radius: 14px; background: var(--crema); font-size: 12.5px; }
.fe-steps li small { color: var(--tinta-2); line-height: 1.35; }
.fe-steps li.done { background: var(--albahaca-s); }
.fe-steps li.now { background: var(--tomate-s); box-shadow: inset 0 0 0 2px var(--tomate); }
.fe-dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; background: var(--papel); color: var(--tinta-2); margin-bottom: 4px; }
.fe-steps li.done .fe-dot { background: var(--albahaca); color: #fff; }
.fe-steps li.now .fe-dot { background: var(--tomate); color: #fff; }
@media (max-width: 1100px) { .fe-steps { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .fe-steps { grid-template-columns: 1fr 1fr; } }
.fe-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 10px; }
.fe-datos div { display: grid; gap: 2px; }
.fe-datos span { font-size: 12px; color: var(--tinta-2); }
.fe-datos b { font-size: 14px; }
.fe-cert { display: flex; gap: 14px; align-items: center; margin-top: 10px; padding: 14px; border-radius: 14px; background: var(--crema); }
.fe-cert > div { display: grid; gap: 2px; }
.fe-cert span { font-size: 13px; color: var(--tinta-2); }
.fe-cert .st { justify-self: start; }
.fe-cert-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--tinta); color: var(--azafran); flex: none; }
.fe-bar { height: 7px; border-radius: 99px; background: var(--crema-2); overflow: hidden; width: 140px; margin-bottom: 3px; }
.fe-bar i { display: block; height: 100%; background: var(--albahaca); border-radius: 99px; }
.fe-bar i.poco { background: var(--azafran); }
#feFil { flex-wrap: wrap; }
.fe-ri { display: grid; gap: 3px; padding: 16px; border-radius: 14px; background: #fff; border: 1px dashed var(--linea-2); font: 13px/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace; }
.fe-ri hr { border: 0; border-top: 1px dashed var(--linea-2); width: 100%; margin: 6px 0; }
.fe-ri > div { display: flex; justify-content: space-between; }
.fe-ri-tot { font-weight: 700; font-size: 15px; }
.fe-ri .fe-ri-qr { display: flex; gap: 12px; align-items: center; justify-content: flex-start; }
.fe-ri-qr > div:last-child { display: grid; gap: 2px; font-size: 12px; }
.fe-drop { display: grid; justify-items: center; gap: 6px; padding: 24px; border: 2px dashed var(--linea-2); border-radius: 16px; cursor: pointer; text-align: center; font-size: 22px; color: var(--tomate); }
.fe-drop b { font-size: 14px; color: var(--tinta); }
.fe-drop:hover { border-color: var(--tomate); background: var(--tomate-s); }
.fe-cert-ic svg { width: 22px; height: 22px; }

/* ── Cuentas: usuarios, mi cuenta, accesos (sesion.js, admin-accesos.js) ── */
.u-cupo { display: grid; grid-template-columns: minmax(0, 1fr) 200px auto; gap: 18px; align-items: center; }
.u-cupo > div:first-child { display: grid; gap: 2px; }
.u-cupo.lleno { box-shadow: inset 0 0 0 2px var(--azafran); }
.u-barra { height: 9px; border-radius: 99px; background: var(--crema-2); overflow: hidden; }
.u-barra i { display: block; height: 100%; background: var(--albahaca); border-radius: 99px; }
.u-cupo.lleno .u-barra i { background: var(--azafran); }
@media (max-width: 700px) { .u-cupo { grid-template-columns: 1fr; } }
.u-acc { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.clave-tmp { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 20px; border-radius: 16px; background: var(--crema); border: 2px dashed var(--linea-2); margin-top: 10px; }
.clave-tmp span { color: var(--tinta-2); font-size: 14px; }
.clave-tmp b { font: 700 26px ui-monospace, Consolas, monospace; letter-spacing: .04em; color: var(--tinta); user-select: all; }
.demo-aviso { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 9px 16px; background: var(--azafran-s); color: #8A5208; font-size: 13.5px; font-weight: 600; }
.demo-aviso a { color: var(--tomate-d); text-decoration: underline; }
.cuenta-aviso { display: flex; gap: 14px; align-items: center; border: 2px solid var(--azafran); background: var(--azafran-s); }
.cuenta-aviso > svg { font-size: 26px; color: #A7650E; flex: none; }
.cuenta-aviso div { display: grid; gap: 2px; }
.cuenta-aviso span { color: var(--tinta-2); font-size: 14px; }
.card.resaltar { box-shadow: inset 0 0 0 2px var(--tomate); }
.card .field { margin-bottom: 12px; }
.acc-plan { border: 1px solid var(--linea-2); border-radius: 10px; padding: 6px 8px; background: var(--papel); }
.acc-vacio { display: flex; gap: 14px; align-items: center; }
.acc-vacio > div { display: grid; gap: 4px; }

/* ── Membresía (admin) y panel en blanco (cuenta real) ── */
.src.fe { background: #E3F1E6; color: #3E8E5A; }
.mem-form { display: grid; gap: 4px; }
.mem-sub { padding: 10px 14px; margin: 2px 0 6px 12px; border-left: 3px solid var(--linea-2); display: grid; gap: 6px; }
.mem-sub .field small { font-size: 12px; }
.mem-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; margin-top: 8px; border-radius: 14px; background: var(--crema); }
.mem-total b { font: 700 22px var(--f-titulo); }
.rl-vacio { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 24px; }
.rl-vacio-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; background: var(--tomate-s); color: var(--tomate); }
.rl-vacio p { max-width: 460px; }
.rl-pasos { display: grid; gap: 8px; margin-top: 6px; }
.rl-paso { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--crema); color: inherit; text-decoration: none; transition: background .2s; }
.rl-paso:hover { background: var(--crema-2); }
.rl-paso > div { flex: 1; display: grid; gap: 2px; }
.rl-paso > svg:last-child { color: var(--tinta-3); }
.rl-paso-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 17px; background: var(--papel); color: var(--tomate); flex: none; }
.rl-paso.ok .rl-paso-ic { background: var(--albahaca); color: #fff; }
.rl-paso.ok b { text-decoration: line-through; color: var(--tinta-2); }
.rl-hora { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.rl-hora .input { padding: 8px 10px; }
.rl-emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; margin-top: 6px; }
.rl-emojis button { height: 40px; border-radius: 10px; font-size: 20px; background: var(--crema); border: 2px solid transparent; }
.rl-emojis button.on { border-color: var(--tomate); background: var(--tomate-s); }
.rl-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.rl-cat-acc { padding: 10px 8px 2px; border-top: 1px solid var(--linea); margin-top: 8px; }
