/* BINAH · demos vivas (v4). Un BINAH en miniatura hecho en HTML, no una captura.
   Todo va en em: demo.js pone el font-size del anfitrión (.scn) a ancho/56 en escritorio y ancho/22 en teléfono.
   La cámara es un transform sobre .app; el cursor vive dentro de .app y se mueve con ella. */
.scn { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #F3F5FA; font-size: 10px; isolation: isolate; -webkit-user-select: none; user-select: none; contain: layout paint; }
.scn--phone { aspect-ratio: 9 / 19; }
.scn--phone.scn--short { aspect-ratio: 9 / 15.6; }
.scn noscript img { width: 100%; height: 100%; object-fit: cover; object-position: 0 0; }
:where(.app), :where(.app) * { box-sizing: border-box; margin: 0; padding: 0; letter-spacing: 0; }
:where(.app) button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
:where(.app) input { font: inherit; color: inherit; min-width: 0; }
:where(.app) b { font-weight: 600; }
:where(.app) small, :where(.app) i, :where(.app) em, :where(.app) u { font-style: normal; font-size: inherit; text-decoration: none; }
.app { position: absolute; inset: 0; display: grid; grid-template-columns: 3.2em minmax(0, 1fr); color: #0B1120; font: 400 1em/1.25 "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; text-align: left; transform-origin: 0 0; transition: transform .8s cubic-bezier(.65, .02, .2, 1); animation: d-fade .5s ease both; }
.app .i { width: 1.15em; height: 1.15em; flex: none; }

/* armazón: riel, barra superior, cuerpo */
.d-rail { background: #0B1120; display: flex; flex-direction: column; align-items: center; gap: .45em; padding: .7em 0; }
.d-rail img { width: 1.9em; height: 1.9em; margin-bottom: .5em; }
.d-rail button { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: .6em; color: #8A96B2; transition: background .2s, color .2s; }
.d-rail button.is-on { background: linear-gradient(135deg, #8B5CF6, #4F46E5); color: #fff; box-shadow: 0 .3em .8em rgba(79, 70, 229, .45); }
.d-main { display: grid; grid-template-rows: 2.9em minmax(0, 1fr); min-width: 0; min-height: 0; }
.d-top { display: flex; align-items: center; gap: .7em; padding: 0 1.1em; background: #fff; border-bottom: 1px solid #E3E7F0; }
.d-top__t { font-size: 1.02em; font-weight: 600; }
.d-net, .d-tasa { display: inline-flex; align-items: center; gap: .4em; font-size: .68em; font-weight: 500; padding: .34em .75em; border-radius: 99em; background: #EEF1F7; color: #3B4660; white-space: nowrap; transition: background .3s, color .3s; }
.d-net { margin-left: auto; }
.d-net > i { width: .6em; height: .6em; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 .22em rgba(16, 185, 129, .2); }
.d-net.is-off { background: #FEF0CC; color: #8A3A06; }
.d-net.is-off > i { background: #D97706; box-shadow: 0 0 0 .22em rgba(217, 119, 6, .22); }
.d-tasa b { font-family: ui-monospace, Menlo, Consolas, monospace; color: #0B1120; }
.d-tasa.is-flash { animation: d-flash 1.2s ease; }
.d-user { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: linear-gradient(135deg, #8B5CF6, #06B6D4); color: #fff; }
.d-user .i { width: 1em; height: 1em; }
.d-body { padding: .9em 1.1em; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: .75em; }
.d-body.is-in, .d-pv.is-in { animation: d-fade .35s ease both; }

/* piezas */
.d-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7em; flex: none; }
.d-kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.d-kpi { background: #fff; border: 1px solid #E3E7F0; border-top: .22em solid #C9D0DF; border-radius: .8em; padding: .65em .9em .7em; display: grid; gap: .12em; min-width: 0; }
.d-kpi > small { font-size: .68em; color: #5E6880; display: flex; justify-content: space-between; align-items: center; gap: .4em; white-space: nowrap; }
.d-kpi > b { font-size: 1.4em; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.d-kpi > span { font-size: .62em; color: #5E6880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-kpi--ok { border-top-color: #10B981; } .d-kpi--ok > b { color: #0A7D4F; }
.d-kpi--warn { border-top-color: #F59E0B; } .d-kpi--warn > b { color: #B54708; }
.d-kpi--bad { border-top-color: #EF4444; } .d-kpi--bad > b { color: #C81E1E; }
.d-kpi--hero { background: linear-gradient(135deg, #7C3AED, #4F46E5); border-color: transparent; color: #fff; }
.d-kpi--hero > small, .d-kpi--hero > span { color: rgba(255, 255, 255, .85); }
.d-kpi--hero em { font-size: .82em; font-weight: 700; background: rgba(255, 255, 255, .22); padding: .15em .55em; border-radius: 99em; }
.d-kpi.is-bump > b { animation: d-bump .7s ease; }
.d-card { background: #fff; border: 1px solid #E3E7F0; border-radius: .8em; padding: .8em .9em; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: .5em; overflow: hidden; }
.d-h { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; font-size: .92em; font-weight: 600; flex: none; }
.d-h small { font-size: .72em; font-weight: 400; color: #5E6880; display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
.d-live { width: .6em; height: .6em; border-radius: 50%; background: #22D3EE; animation: d-pulse 1.4s ease infinite; }
.d-ev { display: grid; grid-template-columns: .55em minmax(0, 1fr) auto; gap: .6em; align-items: start; padding: .48em 0; border-top: 1px solid #EEF1F6; }
.d-ev:first-child { border-top: 0; }
.d-ev > i { width: .5em; height: .5em; border-radius: 50%; margin-top: .32em; background: #6D3AE0; }
.d-ev--ok > i { background: #0A7D4F; } .d-ev--warn > i { background: #D97706; } .d-ev--bad > i { background: #C81E1E; } .d-ev--out > i { background: #0E7490; }
.d-ev b { display: block; font-size: .76em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-ev span { display: block; font-size: .66em; color: #5E6880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-ev em { font-size: .62em; color: #7A8499; white-space: nowrap; }
.d-ev em.d-go { font-weight: 600; color: #0B1120; }
.d-ev.is-new { animation: d-new 1.6s cubic-bezier(.2, .8, .2, 1) both; }
.d-feed__list { min-height: 0; overflow: hidden; }
.d-meter { display: grid; gap: .25em; }
.d-meter > div { display: flex; justify-content: space-between; font-size: .7em; }
.d-meter > div b { font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-meter > i { display: block; height: .32em; border-radius: 99em; background: #EEF1F6; overflow: hidden; }
.d-meter > i > u { display: block; height: 100%; width: var(--w, 0%); background: linear-gradient(90deg, #8B5CF6, #4F46E5); border-radius: inherit; transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.d-hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5em; height: 4.6em; flex: none; }
.d-hours > span { display: flex; flex-direction: column; justify-content: flex-end; gap: .25em; height: 100%; min-height: 0; }
.d-hours > span > u { display: block; border-radius: .3em .3em 0 0; background: #E3E7F0; min-height: .25em; transition: height .8s cubic-bezier(.2, .8, .2, 1); }
.d-hours > span.is-now > u { background: linear-gradient(180deg, #8B5CF6, #4F46E5); }
.d-hours > span > em { font-size: .58em; color: #7A8499; text-align: center; flex: none; }
.d-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-size: .76em; font-weight: 600; padding: .62em 1em; border-radius: .65em; background: #fff; border: 1px solid #D5DAE6; color: #0B1120; white-space: nowrap; text-align: center; transition: transform .15s, opacity .2s, background .2s; }
.d-btn--pri { background: linear-gradient(135deg, #7C3AED, #5B34E0); border-color: transparent; color: #fff; box-shadow: 0 .35em .9em rgba(109, 58, 224, .35); }
.d-btn--wide { width: 100%; }
.d-btn--s { font-size: .68em; padding: .42em .8em; }
.d-btn[disabled] { opacity: .45; box-shadow: none; cursor: default; }
.d-btn kbd { font: inherit; font-size: .84em; padding: .08em .42em; border-radius: .35em; background: rgba(255, 255, 255, .22); }
.d-btn:not(.d-btn--pri) kbd { background: #EEF1F6; color: #5E6880; }
.is-hit { transform: scale(.95); }
.d-input { width: 100%; font-size: .76em; padding: .52em .7em; border-radius: .6em; border: 1px solid #D5DAE6; background: #fff; font-family: ui-monospace, Menlo, Consolas, monospace; outline: 0; -webkit-user-select: text; user-select: text; }
.d-input--t { font-family: inherit; }
.d-input.is-focus, .d-input:focus { border-color: #6D3AE0; box-shadow: 0 0 0 .22em rgba(109, 58, 224, .18); }
.d-search { display: flex; align-items: center; gap: .5em; flex: 1; padding: 0 .7em; border-radius: .65em; border: 1px solid #D5DAE6; background: #fff; color: #7A8499; min-width: 0; }
.d-search input { flex: 1; border: 0; outline: 0; background: none; font-size: .74em; padding: .62em 0; color: #0B1120; -webkit-user-select: text; user-select: text; }
.d-chip { font-size: .7em; font-weight: 500; padding: .44em .85em; border-radius: 99em; background: #fff; border: 1px solid #D5DAE6; color: #3B4660; white-space: nowrap; transition: background .2s, color .2s, transform .15s; }
.d-chip.is-on { background: #0B1120; border-color: #0B1120; color: #fff; }
.d-pill { display: inline-flex; align-items: center; gap: .35em; font-size: .86em; font-weight: 600; padding: .16em .62em; border-radius: 99em; background: #EEF1F6; color: #3B4660; white-space: nowrap; transition: background .3s, color .3s; }
.d-pill--ok { background: #E2F6EB; color: #0A6B44; } .d-pill--warn { background: #FEF0CC; color: #8A3A06; } .d-pill--bad { background: #FDE5E5; color: #B11B1B; } .d-pill--vio { background: #EEE8FF; color: #5B2FD0; } .d-pill--cy { background: #DDF6FB; color: #0B6477; }
.d-tools { display: flex; align-items: center; gap: .5em; flex: none; }
.d-tbl { width: 100%; border-collapse: collapse; font-size: .74em; }
.d-tbl th { font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #7A8499; text-align: left; padding: .4em .7em .5em; border-bottom: 1px solid #E3E7F0; white-space: nowrap; }
.d-tbl td { padding: .52em .7em; border-bottom: 1px solid #EEF1F6; white-space: nowrap; }
.d-tbl .n { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-tbl tbody tr { transition: background .25s; cursor: pointer; }
.d-tbl tr.is-hot { background: #F3EEFF; box-shadow: inset .25em 0 0 #6D3AE0; }
.d-tbl tr.is-gone { display: none; }
.d-tbl tr.is-flash { animation: d-flash 1.4s ease; }
.d-tbl .d-btn { font-size: .9em; padding: .32em .75em; }
.d-empty { font-size: .7em; color: #7A8499; text-align: center; padding: 2em .6em; border: 1px dashed #D5DAE6; border-radius: .7em; line-height: 1.4; }
.d-empty--s { padding: .9em .6em; }
.d-toasts { position: absolute; right: 1em; bottom: 1em; z-index: 8; display: grid; gap: .4em; justify-items: end; pointer-events: none; }
.d-toast { display: flex; align-items: center; gap: .6em; font-size: .76em; font-weight: 500; padding: .65em .95em; border-radius: .7em; background: #0B1120; color: #fff; box-shadow: 0 .8em 2em rgba(11, 17, 32, .3); animation: d-toast 3s ease both; white-space: nowrap; }
.d-toast .i { color: #34D399; }
.d-cursor { position: absolute; left: 60%; top: 62%; z-index: 9; width: 1.7em; height: 1.7em; pointer-events: none; opacity: 0; transition: left .62s cubic-bezier(.5, .05, .2, 1), top .62s cubic-bezier(.5, .05, .2, 1), opacity .3s; filter: drop-shadow(0 .15em .25em rgba(11, 17, 32, .4)); }
.d-cursor.is-on { opacity: 1; }
.d-cursor svg { display: block; width: 100%; height: 100%; max-width: none; transition: transform .12s; transform-origin: 12% 8%; }
.d-cursor.is-down svg { transform: scale(.8); }
.d-cursor::after { content: ""; position: absolute; left: 0; top: 0; width: 2.6em; height: 2.6em; margin: -1.3em 0 0 -1.3em; border-radius: 50%; border: .16em solid #8B5CF6; opacity: 0; }
.d-cursor.is-down::after { animation: d-ring .5s ease-out; }
.d-cursor--tap { width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; border-radius: 50%; background: rgba(139, 92, 246, .32); border: .14em solid rgba(139, 92, 246, .85); filter: none; transition: left .55s cubic-bezier(.5, .05, .2, 1), top .55s cubic-bezier(.5, .05, .2, 1), opacity .3s, transform .12s; }
.d-cursor--tap::after { left: 50%; top: 50%; }
.d-cursor--tap.is-down { transform: scale(.78); }

/* Inicio */
.d-in3 { display: grid; grid-template-columns: 1fr 1.15fr .95fr; gap: .7em; flex: 1; min-height: 0; }
.d-stack { display: flex; flex-direction: column; gap: .7em; min-height: 0; min-width: 0; }
.d-stack > .d-card { flex: none; }

/* Punto de venta */
.d-pos { display: grid; grid-template-columns: minmax(0, 1fr) 17.5em; gap: .8em; flex: 1; min-height: 0; }
.d-pos__left { display: flex; flex-direction: column; gap: .7em; min-width: 0; }
.d-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55em; }
.d-prod { display: grid; gap: .18em; align-content: start; background: #fff; border: 1px solid #E3E7F0; border-radius: .7em; padding: .6em .7em .65em; transition: transform .15s, border-color .2s, box-shadow .2s; }
.d-prod b { font-size: .72em; line-height: 1.2; min-height: 2.4em; }
.d-prod span { font-size: .84em; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.d-prod small { font-size: .64em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-prod.is-hit { border-color: #6D3AE0; box-shadow: 0 0 0 .2em rgba(109, 58, 224, .2); }
.d-prod.is-flip span { animation: d-flip .7s ease; }
.d-ticket { gap: .6em; }
.d-lines { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.d-line { display: grid; grid-template-columns: 1.7em minmax(0, 1fr) auto; gap: .55em; align-items: center; padding: .42em 0; border-bottom: 1px solid #EEF1F6; font-size: .74em; }
.d-line.is-new { animation: d-new 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.d-line > i { display: grid; place-items: center; height: 1.7em; border-radius: .4em; background: #EEE8FF; color: #5B2FD0; font-weight: 700; }
.d-line > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-line > b { font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-tot { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 0 .5em; padding-top: .5em; border-top: 1px solid #E3E7F0; flex: none; }
.d-tot > span { font-size: .72em; color: #5E6880; }
.d-tot > b { font-size: 1.22em; font-weight: 700; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.d-tot > small { grid-column: 2; font-size: .7em; color: #5E6880; text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-banner { display: flex; align-items: center; gap: .6em; font-size: .72em; line-height: 1.35; padding: .55em .8em; border-radius: .65em; background: #FFF7E6; border: 1px solid #F5C56B; color: #7A3706; flex: none; animation: d-new 1s ease both; }
.d-banner[hidden] { display: none; }
.d-banner.is-ok { background: #E2F6EB; border-color: #9ADBB9; color: #0A6B44; }

/* ventanas */
.d-veil { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(11, 17, 32, .5); animation: d-fade .25s ease both; }
.d-veil[hidden] { display: none; }
.d-dialog { width: 45em; max-width: 94%; background: #fff; border-radius: 1em; box-shadow: 0 2em 4em rgba(11, 17, 32, .35); overflow: hidden; animation: d-pop .35s cubic-bezier(.2, .9, .3, 1.1) both; }
.d-dialog--sm { width: 25em; }
.d-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: .85em 1.2em; border-bottom: 1px solid #E3E7F0; }
.d-dialog__head b { display: block; font-size: 1.08em; }
.d-dialog__head small { font-size: .66em; color: #5E6880; }
.d-dialog__tot { text-align: right; white-space: nowrap; }
.d-dialog__tot b { font-size: 1.32em; font-weight: 700; letter-spacing: -.02em; }
.d-dialog__tot small { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .7em; }
.d-dialog__body { display: grid; grid-template-columns: minmax(0, 1fr) 14.5em; }
.d-dialog__body > div { padding: .85em 1.2em; display: grid; gap: .55em; align-content: start; min-width: 0; }
.d-dialog--sm .d-dialog__body { grid-template-columns: minmax(0, 1fr); }
.d-sum { background: #F3F5FA; border-left: 1px solid #E3E7F0; }
.d-cap { font-size: .58em; font-weight: 700; letter-spacing: .08em; color: #5E6880; text-transform: uppercase; }
.d-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4em; }
.d-meth { display: grid; gap: .08em; padding: .48em .65em; border: 1px solid #D5DAE6; border-radius: .6em; background: #fff; transition: transform .15s, background .2s, border-color .2s; }
.d-meth b { font-size: .74em; } .d-meth small { font-size: .6em; color: #5E6880; }
.d-meth.is-on { background: #F1ECFF; border-color: #6D3AE0; }
.d-pays { display: grid; gap: .4em; }
.d-pay { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) 8.6em; gap: .55em; align-items: center; padding: .42em .6em; border: 1px solid #E3E7F0; border-radius: .6em; }
.d-pay > i { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #EEF1F6; font-size: .66em; font-weight: 700; }
.d-pay > span b { display: block; font-size: .76em; }
.d-pay > span small { display: block; font-size: .62em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-pay > label { display: flex; align-items: center; gap: .4em; }
.d-pay > label > span { font-size: .64em; color: #5E6880; }
.d-sr { display: flex; justify-content: space-between; gap: .6em; font-size: .72em; }
.d-sr b { font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.d-sr--big { font-weight: 600; padding-top: .5em; border-top: 1px solid #D5DAE6; }
.d-sr--rest b { color: #C81E1E; transition: color .3s; }
.d-sr--rest.is-ok b { color: #0A7D4F; }
.d-warn { font-size: .64em; line-height: 1.4; padding: .6em .7em; border-radius: .6em; background: #FEF0CC; color: #8A3A06; border: 1px solid #F7D98A; transition: background .3s, color .3s, border-color .3s; }
.d-warn.is-ok { background: #E2F6EB; color: #0A6B44; border-color: #A8E0C2; }
.d-dialog__foot { display: flex; gap: .5em; align-items: center; padding: .75em 1.2em; border-top: 1px solid #E3E7F0; }
.d-dialog__foot > span { flex: 1; }
.d-chk { display: grid; grid-template-columns: 1.5em minmax(0, 1fr) auto; gap: .6em; align-items: center; padding: .5em .6em; border: 1px solid #E3E7F0; border-radius: .6em; width: 100%; transition: background .2s, border-color .2s, transform .15s; }
.d-chk > i { display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: .4em; border: .12em solid #C2C9D8; color: transparent; transition: background .2s, border-color .2s; }
.d-chk > i .i { width: 1em; height: 1em; stroke-width: 3; }
.d-chk > b { font-size: .76em; font-weight: 500; }
.d-chk > small { font-size: .68em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-chk.is-on { background: #F1FBF5; border-color: #9ADBB9; }
.d-chk.is-on > i { background: #0A7D4F; border-color: #0A7D4F; color: #fff; }
.d-row { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; }

/* cajón lateral (kardex, receta) */
.d-drawer { position: absolute; top: 2.9em; right: 0; bottom: 0; width: 19.5em; z-index: 4; background: #fff; border-left: 1px solid #E3E7F0; box-shadow: -1.2em 0 2.4em rgba(11, 17, 32, .16); padding: .9em 1em; display: flex; flex-direction: column; gap: .6em; transform: translateX(106%); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.d-drawer.is-open { transform: none; }
.d-drawer__t { font-size: 1em; font-weight: 600; display: flex; justify-content: space-between; gap: .5em; align-items: center; }
.d-drawer__s { font-size: .68em; color: #5E6880; }
.d-mov { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5em; font-size: .72em; padding: .42em 0; border-bottom: 1px solid #EEF1F6; }
.d-mov span { color: #3B4660; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-mov b { font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-mov b.up { color: #0A7D4F; } .d-mov b.dn { color: #C81E1E; }
.d-drawer.is-open .d-mov { animation: d-new .9s ease both; }
.d-drawer.is-open .d-mov:nth-child(2) { animation-delay: .12s; } .d-drawer.is-open .d-mov:nth-child(3) { animation-delay: .24s; } .d-drawer.is-open .d-mov:nth-child(4) { animation-delay: .36s; }
.d-big { display: flex; align-items: center; justify-content: space-between; gap: .6em; padding: .6em .75em; border-radius: .7em; background: #F3F5FA; font-size: .74em; }
.d-big b { font-size: 1.5em; font-weight: 700; letter-spacing: -.02em; transition: color .3s; }
.d-big.is-ok b { color: #0A7D4F; } .d-big.is-warn b { color: #B54708; } .d-big.is-bad b { color: #C81E1E; }
.d-field { display: grid; gap: .25em; }
.d-field > span { font-size: .64em; color: #5E6880; }
.d-grow { flex: 1; min-height: 0; }

/* cartera */
.d-aging { display: grid; gap: .5em; }
.d-aging__bar { display: flex; height: .8em; border-radius: 99em; overflow: hidden; background: #EEF1F6; }
.d-aging__bar > u { display: block; height: 100%; width: var(--w); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.d-aging__bar > u:nth-child(1) { background: #10B981; } .d-aging__bar > u:nth-child(2) { background: #F59E0B; } .d-aging__bar > u:nth-child(3) { background: #EF4444; } .d-aging__bar > u:nth-child(4) { background: #7F1D1D; }
.d-aging__leg { display: flex; gap: 1.2em; font-size: .68em; color: #3B4660; flex-wrap: wrap; }
.d-aging__leg span { display: inline-flex; align-items: center; gap: .4em; white-space: nowrap; }
.d-aging__leg i { width: .65em; height: .65em; border-radius: 50%; }
.d-aging__leg b { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* salón */
.d-salon { display: grid; grid-template-columns: minmax(0, 1fr) 16.5em; gap: .8em; flex: 1; min-height: 0; }
.d-mesas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55em; align-content: start; }
.d-mesa { display: grid; gap: .2em; align-content: start; padding: .55em .7em .6em; border-radius: .7em; background: #fff; border: 1px solid #E3E7F0; border-left: .3em solid #10B981; min-height: 4.5em; transition: transform .15s, background .3s, border-color .3s, box-shadow .2s; }
.d-mesa b { font-size: .8em; }
.d-mesa span { font-size: .62em; font-weight: 600; color: #0A6B44; }
.d-mesa small { font-size: .62em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
.d-mesa--ocup { border-left-color: #6D3AE0; background: #F8F5FF; } .d-mesa--ocup span { color: #5B2FD0; }
.d-mesa--cuenta { border-left-color: #F59E0B; background: #FFF9EA; } .d-mesa--cuenta span { color: #8A3A06; }
.d-mesa--res { border-left-color: #06B6D4; background: #F0FBFD; } .d-mesa--res span { color: #0B6477; }
.d-mesa.is-sel { box-shadow: 0 0 0 .2em rgba(109, 58, 224, .35); }
.d-mesa.is-flash { animation: d-bumpbox .8s ease; }
.d-dishes { display: grid; grid-template-columns: 1fr 1fr; gap: .35em; flex: none; }
.d-dish { display: grid; gap: .1em; padding: .42em .55em; border: 1px solid #D5DAE6; border-radius: .55em; background: #fff; transition: transform .15s, border-color .2s; }
.d-dish b { font-size: .66em; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-dish small { font-size: .58em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-dish.is-hit { border-color: #6D3AE0; }

/* cocina */
.d-kds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6em; align-items: start; flex: 1; min-height: 0; font-size: 1.3em; }
.d-tk { background: #fff; border: 1px solid #E3E7F0; border-radius: .8em; overflow: hidden; display: flex; flex-direction: column; transition: opacity .45s, transform .45s; }
.d-tk.is-new { animation: d-pop .5s cubic-bezier(.2, .9, .3, 1.1) both; }
.d-tk.is-done { opacity: 0; transform: translateY(-.8em) scale(.94); }
.d-tk__h { display: flex; justify-content: space-between; align-items: center; gap: .5em; padding: .5em .7em; background: #0B1120; color: #fff; transition: background .3s; }
.d-tk__h b { font-size: .8em; }
.d-tk__h small { font-size: .7em; font-family: ui-monospace, Menlo, Consolas, monospace; opacity: .9; }
.d-tk.is-prep .d-tk__h { background: #4F46E5; }
.d-tk.is-late .d-tk__h { background: #C81E1E; }
.d-tk__s { font-size: .6em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .45em .85em 0; color: #5E6880; }
.d-tk.is-prep .d-tk__s { color: #4F46E5; }
.d-tk__i { display: flex; gap: .5em; font-size: .74em; padding: .34em .65em 0; }
.d-tk__i b { color: #6D3AE0; }
.d-tk__n { font-size: .64em; color: #B54708; padding: .1em .65em 0 1.95em; }
.d-tk .d-btn { margin: .6em .6em .6em; }

/* teléfono */
.app--phone { display: flex; flex-direction: column; background: #F3F5FA; }
.d-pbar { display: flex; justify-content: space-between; align-items: center; padding: .85em 1.3em .45em; flex: none; }
.d-pbar span { font-size: .72em; font-weight: 600; display: inline-flex; gap: .4em; align-items: center; }
.d-pv { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: .6em; padding: 0 .9em .9em; overflow: hidden; position: relative; }
.d-ph { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; padding: .3em .1em 0; flex: none; }
.d-ph b { font-size: 1.15em; font-weight: 700; letter-spacing: -.02em; }
.d-ph small { font-size: .7em; color: #5E6880; }
.d-pm { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em; }
.d-pm .d-mesa { min-height: 4.2em; padding: .5em .55em; }
.d-pm[hidden], .d-pl[hidden], .d-pcta[hidden], .d-done[hidden] { display: none; }
.d-pl { display: grid; gap: .4em; }
.d-pli { display: grid; grid-template-columns: minmax(0, 1fr) auto 1.9em; gap: .5em; align-items: center; width: 100%; background: #fff; border: 1px solid #E3E7F0; border-radius: .7em; padding: .5em .5em .5em .75em; transition: transform .15s, border-color .2s, background .2s; }
.d-pli b { font-size: .78em; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-pli small { font-size: .68em; color: #5E6880; font-family: ui-monospace, Menlo, Consolas, monospace; }
.d-pli > i { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #EEE8FF; color: #5B2FD0; font-weight: 700; font-size: .8em; transition: background .2s, color .2s; }
.d-pli.is-on { border-color: #6D3AE0; background: #F8F5FF; }
.d-pli.is-on > i { background: #6D3AE0; color: #fff; }
.d-pcta { margin-top: auto; display: grid; gap: .5em; flex: none; }
.d-pcta > div { display: flex; justify-content: space-between; align-items: baseline; font-size: .76em; }
.d-pcta > div b { font-size: 1.25em; }
.d-pcta .d-btn { font-size: .86em; padding: .8em 1em; }
.d-done { position: absolute; inset: 0; z-index: 3; display: grid; place-content: center; justify-items: center; gap: .6em; background: #fff; text-align: center; padding: 1.5em; animation: d-fade .3s both; }
.d-done > i { display: grid; place-items: center; width: 4em; height: 4em; border-radius: 50%; background: linear-gradient(135deg, #10B981, #06B6D4); color: #fff; animation: d-pop .45s cubic-bezier(.2, .9, .3, 1.2) both; }
.d-done > i .i { width: 2em; height: 2em; stroke-width: 3; }
.d-done b { font-size: 1.05em; } .d-done small { font-size: .74em; color: #5E6880; line-height: 1.35; }
.d-prog { height: .5em; border-radius: 99em; background: #E3E7F0; overflow: hidden; flex: none; }
.d-prog > u { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, #8B5CF6, #06B6D4); border-radius: inherit; transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.d-stop { display: grid; grid-template-columns: 1.9em minmax(0, 1fr) auto; gap: .55em; align-items: center; background: #fff; border: 1px solid #E3E7F0; border-radius: .75em; padding: .6em .65em; transition: background .3s, border-color .3s; }
.d-stop > i { display: grid; place-items: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: #EEF1F6; color: #3B4660; font-size: .78em; font-weight: 700; transition: background .3s, color .3s; }
.d-stop > i .i { width: 1.1em; height: 1.1em; stroke-width: 3; }
.d-stop b { display: block; font-size: .78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-stop small { display: block; font-size: .66em; color: #5E6880; }
.d-stop .d-btn { font-size: .68em; padding: .5em .75em; }
.d-stop.is-ok { background: #F1FBF5; border-color: #9ADBB9; }
.d-stop.is-ok > i { background: #0A7D4F; color: #fff; }
.d-stop .d-pill { font-size: .66em; }
.d-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #ECE5DC; margin: 0 -.9em -.9em; }
.d-chat__h { display: flex; align-items: center; gap: .6em; padding: .6em .9em; background: #0B5E54; color: #fff; flex: none; }
.d-chat__h img { width: 2.1em; height: 2.1em; border-radius: 50%; background: #0B1120; padding: .25em; }
.d-chat__h b { display: block; font-size: .86em; } .d-chat__h small { display: block; font-size: .64em; opacity: .88; }
.d-chat__b { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: .45em; padding: .8em .7em .5em; overflow: hidden; }
.d-msg { max-width: 86%; font-size: .76em; line-height: 1.35; padding: .5em .7em; border-radius: .2em .8em .8em .8em; background: #fff; align-self: flex-start; box-shadow: 0 .08em .14em rgba(0, 0, 0, .14); animation: d-msg .3s ease both; flex: none; }
.d-msg--me { align-self: flex-end; background: #D9FDD3; border-radius: .8em .2em .8em .8em; }
.d-msg--sys { align-self: center; max-width: 96%; background: #0B1120; color: #fff; display: flex; gap: .5em; align-items: center; font-weight: 500; border-radius: .7em; }
.d-msg--sys .i { color: #34D399; }
.d-typing { display: inline-flex; gap: .28em; padding: .7em .8em; }
.d-typing i { width: .42em; height: .42em; border-radius: 50%; background: #8A96B2; animation: d-dots 1s infinite; }
.d-typing i:nth-child(2) { animation-delay: .15s; } .d-typing i:nth-child(3) { animation-delay: .3s; }
.d-chat__f { display: flex; gap: .5em; align-items: center; padding: .45em .6em .7em; flex: none; }
.d-chat__f > span { flex: 1; background: #fff; border-radius: 99em; padding: .6em .95em; font-size: .72em; min-height: 2.5em; white-space: nowrap; overflow: hidden; }
.d-chat__f > button { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: #0B5E54; color: #fff; flex: none; }

@keyframes d-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes d-pop { from { opacity: 0; transform: translateY(.8em) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes d-new { 0% { opacity: 0; transform: translateY(-.6em); background-color: rgba(139, 92, 246, .22); } 25% { opacity: 1; transform: none; background-color: rgba(139, 92, 246, .22); } 100% { background-color: rgba(139, 92, 246, 0); } }
@keyframes d-msg { from { opacity: 0; transform: translateY(.5em); } to { opacity: 1; transform: none; } }
@keyframes d-flash { 0%, 35% { background-color: #FDE68A; } 100% { background-color: transparent; } }
@keyframes d-bump { 30% { transform: scale(1.09); } }
@keyframes d-bumpbox { 30% { transform: scale(1.06); box-shadow: 0 0 0 .3em rgba(109, 58, 224, .3); } }
@keyframes d-pulse { 50% { opacity: .3; } }
@keyframes d-ring { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.3); } }
@keyframes d-toast { 0% { opacity: 0; transform: translateY(.8em); } 8%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(.4em); } }
@keyframes d-flip { 0% { transform: rotateX(0); } 40% { transform: rotateX(90deg); color: #6D3AE0; } 100% { transform: rotateX(0); } }
@keyframes d-dots { 0%, 60%, 100% { transform: none; opacity: .5; } 30% { transform: translateY(-.25em); opacity: 1; } }
