/* admin.css — panel del negocio. Papel crema + sidebar tinta. Todo bajo .a-root (lleva .light). */
.a-root { height: 100%; min-height: 0; background: var(--bg); color: var(--text); }
.a-shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); height: 100%; min-height: 0; }

/* Sidebar (tema oscuro dentro del root claro) */
.a-side { --bg: #07121d; --surface: #0d1f31; --surface-2: #12293f; --surface-3: #1a3752; --text: #f1ebdc; --muted: #8fa4b9; --border: rgba(241, 235, 220, .11); --border-2: rgba(241, 235, 220, .22); --accent: #38e8ef; --cyan: #38e8ef;
  background: #07121d; color: var(--text); display: flex; flex-direction: column; gap: 1.4rem; padding: 1.2rem .9rem; overflow: auto; min-height: 0; border-right: 1px solid #000; }
.a-brand { display: flex; align-items: center; gap: .75rem; padding: .2rem .45rem; }
.a-brand img { width: 42px; height: 42px; border-radius: 11px; border: 1.5px solid var(--cyan); object-fit: cover; box-shadow: 0 0 18px rgba(56, 232, 239, .25); }
.a-brand b { display: block; font: 900 1.15rem/1 var(--font-display); font-stretch: 72%; text-transform: uppercase; letter-spacing: .02em; }
.a-brand small { font: 700 .62rem var(--font-mono); letter-spacing: .2em; color: var(--cyan); text-transform: uppercase; }
.a-nav { display: flex; flex-direction: column; gap: 2px; }
.a-nav button { position: relative; display: flex; align-items: center; gap: .75rem; padding: .66rem .85rem; border: 0; background: none; color: var(--muted); font: 700 .88rem var(--font-body); text-align: left; border-radius: 11px; transition: background .15s, color .15s; }
.a-nav button:hover { color: var(--text); background: rgba(241, 235, 220, .05); }
.a-nav button.on { background: var(--surface-2); color: var(--text); }
.a-nav button.on::before { content: ''; position: absolute; left: -.9rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.a-badge { margin-left: auto; min-width: 20px; text-align: center; background: var(--red); color: #fff; border-radius: 99px; font: 800 .68rem/1 var(--font-body); padding: .22rem .45rem; }
.a-side-foot { margin-top: auto; padding: .9rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; }
.a-side-foot b { display: block; font-size: .86rem; margin-bottom: .15rem; }
.a-side-foot .mono { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }

/* Cuerpo */
.a-body { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.a-top { display: flex; align-items: center; gap: 1rem; padding: .75rem 1.6rem; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 80%, #fff); flex-wrap: wrap; }
.a-clock { font: 800 1.4rem/1 var(--font-display); font-stretch: 80%; font-variant-numeric: tabular-nums; }
.a-clock + span { display: block; font-size: .74rem; color: var(--muted); margin-top: 2px; }
.a-clock + span::first-letter { text-transform: uppercase; }
.a-top select { width: auto; padding: .45rem .7rem; font-size: .82rem; border-radius: 10px; }
.a-demo { display: inline-flex; align-items: center; gap: .4rem; font: 700 .66rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.a-notice { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .8rem; border-radius: 99px; border: 1.5px solid var(--red); background: color-mix(in srgb, var(--red) 10%, var(--surface)); color: var(--text); font: 700 .8rem var(--font-body); animation: a-pop .4s var(--ease); }
@keyframes a-pop { from { transform: scale(.9); opacity: 0; } }
.a-main { flex: 1; min-height: 0; overflow: auto; padding: 1.6rem 1.6rem 3.5rem; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.a-h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
.a-main .card { box-shadow: 0 1px 0 rgba(20, 32, 46, .04), 0 12px 28px -18px rgba(20, 32, 46, .22); }
.a-grid { display: grid; gap: 1.1rem; margin-bottom: 1.1rem; }
.a-g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } .a-g32 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } .a-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .a-g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .a-g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.a-kpi .v small { font-size: .55em; color: var(--muted); font-weight: 700; }
.a-kpi.hot { background: #0c1d2e; color: #f3ecda; border-color: #0c1d2e; } .a-kpi.hot .k, .a-kpi.hot .d { color: #8fa4b9; } .a-kpi.hot .v { color: #38e8ef; }
.a-sec { font: 800 .72rem var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1.6rem 0 .8rem; display: flex; align-items: center; gap: .6rem; }
.a-sec::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Pistas en vivo */
.a-lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-bottom: 1.1rem; }
.a-lane { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1rem; border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--border); overflow: hidden; min-height: 188px; }
.a-lane::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--muted); }
.a-lane.st-jugando::before { background: var(--green); } .a-lane.st-proxima::before { background: var(--amber); } .a-lane.st-libre::before { background: var(--cyan); } .a-lane.st-mantenimiento::before { background: repeating-linear-gradient(45deg, var(--red) 0 8px, transparent 8px 16px); }
.a-lane.st-mantenimiento { background: repeating-linear-gradient(135deg, var(--surface) 0 12px, var(--surface-2) 12px 24px); }
.a-lane h3 { font: 900 1.5rem/1 var(--font-display); font-stretch: 72%; text-transform: uppercase; }
.a-lane-who { font-weight: 800; font-size: 1.02rem; line-height: 1.2; }
.a-lane-acts { margin-top: auto; display: flex; gap: .4rem; flex-wrap: wrap; padding-top: .4rem; }

/* Gráficos */
.a-bars { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 8px; }
.a-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font: 700 .64rem var(--font-mono); color: var(--muted); }
.a-col i { display: block; width: 100%; border-radius: 6px 6px 2px 2px; background: color-mix(in srgb, var(--cyan) 55%, var(--surface-3)); min-height: 3px; transition: height .5s var(--ease); }
.a-col.now i { background: var(--red); } .a-col.now { color: var(--red); }
.a-col b { font: 800 .72rem var(--font-body); color: var(--text); }
.a-chart { width: 100%; height: auto; display: block; } .a-chart text { font: 600 10px var(--font-mono); fill: var(--muted); }
.a-legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; } .a-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: -1px; }
.a-rank { display: grid; gap: .7rem; }
.a-rank li { list-style: none; display: grid; grid-template-columns: 1.4rem 1fr auto; gap: .6rem; align-items: center; font-size: .88rem; }
.a-rank ol, .a-rank ul { margin: 0; padding: 0; }
.a-rank .n { font: 800 1.1rem var(--font-display); color: var(--muted); }
.a-rank .bar { grid-column: 2 / 4; height: 5px; margin-top: -.35rem; }
.a-list { display: flex; flex-direction: column; } .a-item { display: flex; align-items: center; gap: .8rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--border); font-size: .88rem; } .a-item:last-child { border-bottom: 0; }
.a-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--muted)) 16%, transparent); color: var(--c, var(--muted)); }
.a-ic.warn { --c: var(--amber); } .a-ic.bad { --c: var(--red); } .a-ic.ok { --c: var(--green); } .a-ic.info { --c: var(--cyan); }
.a-empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); font-size: .9rem; } .a-empty .i { margin: 0 auto .6rem; opacity: .55; }

/* Calendario */
.a-tl { overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-m); }
.a-tl-in { position: relative; min-width: max-content; --hw: 96px; }
.a-tl-row { display: flex; border-bottom: 1px solid var(--border); } .a-tl-row:last-child { border-bottom: 0; }
.a-tl-lane { position: sticky; left: 0; z-index: 4; flex: none; width: 128px; padding: .7rem .9rem; background: var(--surface); border-right: 1px solid var(--border-2); display: flex; flex-direction: column; justify-content: center; }
.a-tl-lane b { font: 900 1.1rem/1 var(--font-display); font-stretch: 72%; text-transform: uppercase; } .a-tl-lane span { font-size: .68rem; color: var(--muted); }
.a-tl-head { display: flex; position: sticky; top: 0; z-index: 5; background: var(--surface-2); border-bottom: 1px solid var(--border-2); }
.a-tl-head .a-tl-lane { background: var(--surface-2); font: 700 .66rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); min-height: 36px; padding-block: .5rem; }
.a-th { width: var(--hw); flex: none; padding: .55rem .5rem; font: 700 .7rem var(--font-mono); color: var(--muted); border-left: 1px solid var(--border); }
.a-track { position: relative; flex: none; width: calc(var(--n) * var(--hw)); height: 72px; cursor: copy;
  background-image: repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px var(--hw)), repeating-linear-gradient(90deg, transparent 0 calc(var(--hw) / 2 - 1px), color-mix(in srgb, var(--border) 55%, transparent) calc(var(--hw) / 2 - 1px) calc(var(--hw) / 2), transparent calc(var(--hw) / 2) var(--hw)); }
.a-track:hover { background-color: color-mix(in srgb, var(--cyan) 5%, transparent); }
.a-track.off { cursor: not-allowed; background-color: var(--surface-2); background-image: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--red) 12%, transparent) 10px 20px); }
.a-blk { position: absolute; top: 7px; bottom: 7px; padding: .3rem .6rem; border-radius: 10px; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--text); text-align: left; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 1px; cursor: pointer; transition: transform .12s, box-shadow .12s; z-index: 2; --c: var(--cyan); }
.a-blk:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--c) 70%, #000); z-index: 3; }
.a-blk b { font: 800 .8rem/1.15 var(--font-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .a-blk span { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-blk.st-en_juego { --c: var(--green); } .a-blk.st-finalizada { --c: var(--muted); background: var(--surface-2); } .a-blk.st-no_show { --c: var(--red); } .a-blk.combo::after { content: 'COMBO'; position: absolute; top: 5px; right: 6px; font: 800 .54rem var(--font-mono); letter-spacing: .06em; color: var(--maple); }
.a-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 6; pointer-events: none; }
.a-now::before { content: 'AHORA'; position: absolute; top: 2px; left: 4px; font: 800 .56rem var(--font-mono); background: var(--red); color: #fff; padding: 1px 5px; border-radius: 4px; }

/* Cocina (KDS) */
.a-kds { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; }
.a-kcol { background: var(--surface-2); border-radius: var(--r-m); padding: .8rem; display: flex; flex-direction: column; gap: .7rem; min-height: 260px; border: 1px solid var(--border); }
.a-kcol h2 { font: 800 .74rem var(--font-mono); letter-spacing: .12em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; color: var(--muted); padding: .1rem .2rem; }
.a-kcol h2 b { background: var(--surface); border-radius: 99px; padding: .1rem .55rem; color: var(--text); }
.a-tk { background: var(--surface); border: 1px solid var(--border); border-left: 5px solid var(--cyan); border-radius: 12px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .5rem; animation: a-pop .35s var(--ease); }
.a-tk.late { border-left-color: var(--red); background: color-mix(in srgb, var(--red) 7%, var(--surface)); }
.a-tk.done { border-left-color: var(--muted); opacity: .75; }
.a-tk-lane { font: 900 1.7rem/1 var(--font-display); font-stretch: 70%; text-transform: uppercase; }
.a-tk ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .2rem; font-size: .88rem; } .a-tk li b { font-family: var(--font-mono); color: var(--accent); margin-right: .3rem; }
.a-tk .timer { font: 800 .86rem var(--font-mono); } .a-tk.late .timer { color: var(--red); }
.a-note { font-size: .78rem; padding: .35rem .55rem; background: color-mix(in srgb, var(--amber) 16%, transparent); border-radius: 8px; }

/* Listas con filtros */
.a-filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.a-filters select, .a-filters .in { width: auto; min-width: 140px; padding: .55rem .8rem; font-size: .85rem; border-radius: 10px; }
.a-search { position: relative; } .a-search .i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); } .a-search .in { padding-left: 2.2rem; min-width: 230px; }
.a-pills { display: flex; gap: .45rem; flex-wrap: wrap; margin-bottom: 1rem; }
.a-pill { border: 1.5px solid var(--border-2); background: var(--surface); color: var(--text); border-radius: 99px; padding: .45rem .9rem; font: 700 .8rem var(--font-body); } .a-pill b { margin-left: .35rem; color: var(--muted); font-family: var(--font-mono); font-size: .72rem; }
.a-pill.on { background: #0c1d2e; color: #f3ecda; border-color: #0c1d2e; } .a-pill.on b { color: #38e8ef; }
.a-who { display: flex; align-items: center; gap: .65rem; } .a-who b { display: block; line-height: 1.2; } .a-who small { color: var(--muted); font-size: .72rem; }
.a-pin { width: 112px !important; padding: .45rem .6rem !important; font: 700 .85rem var(--font-mono) !important; text-align: right; }
.a-row-off { opacity: .55; }
.a-pay { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: center; }
.a-integ { display: flex; align-items: center; gap: .9rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); } .a-integ:last-child { border-bottom: 0; } .a-integ div { flex: 1; } .a-integ small { display: block; color: var(--muted); font-size: .78rem; }
.a-kv { display: grid; grid-template-columns: 8.5rem 1fr; gap: .45rem 1rem; font-size: .88rem; } .a-kv dt { color: var(--muted); font: 700 .68rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; padding-top: .2rem; } .a-kv dd { margin: 0; }
.a-tot { background: var(--surface-2); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .4rem; font-size: .9rem; } .a-tot div { display: flex; justify-content: space-between; } .a-tot .big { font: 900 1.4rem var(--font-display); font-stretch: 80%; border-top: 2px dashed var(--border-2); padding-top: .5rem; margin-top: .2rem; }
.a-itemrow { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .88rem; } .a-itemrow:last-child { border-bottom: 0; } .a-itemrow small { color: var(--muted); display: block; font-size: .74rem; }
.a-check { display: flex; align-items: center; gap: .6rem; font-size: .88rem; }

/* Responsive */
@media (max-width: 1280px) { .a-g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .a-g32 { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
  .a-shell { grid-template-columns: 68px minmax(0, 1fr); }
  .a-side { padding-inline: .5rem; align-items: center; } .a-lbl, .a-brand div, .a-side-foot, .a-badge { display: none; }
  .a-nav button { padding: .75rem; justify-content: center; } .a-nav button.on::before { left: -.5rem; }
  .a-nav button[data-badge]::after { content: attr(data-badge); position: absolute; top: 2px; right: 2px; background: var(--red); color: #fff; border-radius: 99px; font: 800 .6rem var(--font-body); padding: .1rem .35rem; }
  .a-kds { grid-template-columns: repeat(4, 260px); }
}
@media (max-width: 760px) { .a-g3, .a-g4, .a-g2 { grid-template-columns: 1fr; } .a-g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .a-pay { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .a-shell { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .a-side { flex-direction: row; align-items: center; padding: .5rem .7rem; gap: .6rem; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #000; }
  .a-brand { flex: none; } .a-nav { flex-direction: row; flex: none; } .a-nav button { flex: none; } .a-nav button.on::before { left: 20%; right: 20%; top: auto; bottom: -.5rem; width: auto; height: 3px; border-radius: 3px 3px 0 0; }
  .a-top, .a-main { padding-inline: 1rem; } .a-demo { display: none; }
}
