/* ByteFix Restaurante · panel, cocina, acceso y asistente. Réplica del lenguaje visual del panel de TallerByteFix (ver ui.css). */
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; max-width: 1560px; margin: 0 auto; padding: 24px; min-height: 100vh; }
.side { padding: 16px 12px; display: flex; flex-direction: column; gap: 3px; position: sticky; top: 24px; height: calc(100vh - 48px); overflow-y: auto; scrollbar-width: thin; }
.mobile-bar { display: none; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 16px; }
.brand img { border-radius: 12px; flex: none; filter: drop-shadow(0 0 10px hsla(203, 88%, 47%, .45)); }
.brand span { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.2; }
.brand b { color: var(--white-2); font-size: 17px; font-weight: 600; display: block; line-height: 1.2; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px; width: 100%; color: var(--light-gray); font-weight: 500; font: inherit; font-weight: 500; text-align: left; transition: color .25s, transform .25s, background .25s; }
.nav:hover { color: var(--accent); transform: translateX(3px); background: rgba(255, 255, 255, .03); }
.nav.active { color: var(--accent); font-weight: 700; background: rgba(255, 255, 255, .05); }
.nav.active::after { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 2px; background: var(--accent); }
.who { padding: 10px 12px 0; font-size: 13px; color: var(--light-gray-70); margin: 0; }
.main { min-width: 0; padding: 4px 4px 60px; }
.main > * { animation: up .45s var(--ease) both; }
.main > *:nth-child(2) { animation-delay: .05s; } .main > *:nth-child(3) { animation-delay: .1s; } .main > *:nth-child(n+4) { animation-delay: .15s; }
.demo-bar { background: linear-gradient(135deg, hsl(203, 88%, 40%), hsl(250, 70%, 50%)); color: #fff; text-align: center; font-size: 13px; font-weight: 700; padding: 5px 8px; position: sticky; top: 0; z-index: 60; }

/* cabeceras y tarjetas */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin-bottom: 4px; }
.page-head .sub { margin: 0; }
.page-actions, .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card { background: rgba(30, 30, 30, .6); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 22px; margin-bottom: 18px; }
.card.flush { padding: 6px 8px; overflow-x: auto; }
.card.empty { display: grid; justify-items: center; gap: 6px; padding: 34px 22px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.card p + p { margin-top: 8px; }
.card .field + .field { margin-top: 16px; }
.card .grid2 > .field + .field, .card .grid3 > .field + .field { margin-top: 0; }
.card .btn-row { margin-top: 14px; }
.subcard { border: 1px dashed var(--line-2); border-radius: var(--r-md); padding: 14px; margin: 12px 0; }
.notes-card { border-color: hsla(38, 90%, 55%, .45); }
.narrow { max-width: 760px; } .wide { width: 100%; } .pad { padding: 12px; } .top { vertical-align: top; } .gap { margin-top: 18px; }
.note { font-size: 13px; color: var(--light-gray-70); } .warn { color: var(--warn); }
.feed { list-style: none; } .feed li { padding: 9px 0; border-bottom: 1px solid var(--line); } .old { opacity: .55; }
.tabs, .seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); margin-bottom: 16px; max-width: 100%; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; color: var(--light-gray); transition: all .2s; }
.tabs a:hover { color: var(--white-1); }
.tabs a.on, .tabs a[aria-current], .tabs button.on { background: var(--white-2); color: var(--smoky-black); }
.legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.lg { padding: 3px 12px; border-radius: 999px; border: 1.5px solid var(--line-2); font-size: 13px; background: rgba(0, 0, 0, .25); }
.inline-form { margin: 0; }
.check { display: inline-flex; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { display: block; min-width: 0; position: relative; padding: 18px 20px; border-radius: var(--r-md); background: var(--border-gradient-onyx); box-shadow: var(--shadow-2); z-index: 1; min-height: 120px; transition: transform .25s; }
a.kpi:hover { transform: translateY(-3px); }
.kpi::before { content: ''; position: absolute; inset: 1px; background: var(--bg-gradient-jet); border-radius: inherit; z-index: -1; }
.kpi .big { margin: 10px 0 4px; } .kpi .big small { font-size: 14px; font-weight: 400; color: var(--light-gray-70); display: block; margin-top: 2px; }
.kpi .big.mono { font-size: 28px; }

/* tablas (estilo filas del Taller) */
.scroll-x { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 0; }
.table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--light-gray-70); text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .04); }
.table tr:last-child td { border-bottom: 0; }
.table td.right, .table th.right { text-align: right; }
.permisos td, .permisos th { text-align: center; } .permisos td:first-child, .permisos th:first-child { text-align: left; }
.total-row { display: flex; justify-content: space-between; align-items: center; padding: 16px 12px; font-size: 16px; color: var(--white-2); }

/* mesas */
.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.tb { display: flex; flex-direction: column; gap: 3px; padding: 16px; border-radius: var(--r-md); border: 1.5px solid var(--line-2); background: rgba(30, 30, 30, .6); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); min-height: 112px; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.tb:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, .4); }
.tb-name { font-size: 22px; font-weight: 700; color: var(--white-2); } .tb-state { font-size: 13px; font-weight: 700; } .tb-meta { font-size: 12px; color: var(--light-gray-70); } .tb-due { margin-top: auto; font-weight: 700; color: var(--white-2); }
.tb-free { border-color: var(--line-2); }
.tb-occupied { border-color: hsla(203, 88%, 47%, .6); }
.tb-pending { border-color: hsla(38, 90%, 55%, .7); background: hsla(38, 90%, 55%, .1); }
.tb-preparing { border-color: var(--accent); background: var(--accent-soft); }
.tb-ready { border-color: hsla(152, 62%, 44%, .8); background: hsla(152, 62%, 44%, .12); }
.tb-payment { border-color: hsla(270, 70%, 65%, .8); background: hsla(270, 70%, 60%, .12); }
.table-chip { display: inline-block; padding: 3px 12px; border-radius: 8px; background: var(--onyx); color: var(--white-1); font-size: 13px; }
.qr-mini { width: 96px; height: 96px; background: #fff; border-radius: 10px; padding: 4px; }

/* nuevo pedido */
.c-menu { min-width: 0; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.c-prod { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--white-2); min-height: 72px; transition: all .2s; }
.c-prod:hover:not([disabled]) { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.c-prod[disabled] { opacity: .4; cursor: not-allowed; }
.c-cart { position: sticky; top: 24px; align-self: start; }
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }

/* acceso / asistente */
.login { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login .box { width: min(420px, 100%); padding: 32px 30px 24px; text-align: center; max-height: 100%; overflow: auto; animation: up .5s var(--ease) both; }
.login .box.wide-box { width: min(760px, 100%); text-align: left; }
.login-logo { display: block; width: 110px; height: 110px; margin: 0 auto 12px; border-radius: 50%; filter: drop-shadow(0 0 26px hsla(203, 88%, 47%, .6)); animation: bob 3.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.login h1 { font-size: 26px; margin-bottom: 4px; }
.login .sub { margin: 4px auto 20px; font-size: 14px; }
.login form, .login .form { text-align: left; }
.login .btn.primary { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.login .foot { margin-top: 18px; font-size: 12px; color: var(--light-gray-70); }
.login .foot a:hover { color: var(--accent); }
.login .alert { text-align: left; margin-top: 16px; }
.steps { display: flex; gap: 6px; list-style: none; flex-wrap: wrap; margin: 0 0 18px; }
.steps li { padding: 5px 12px; border-radius: 8px; background: var(--onyx); color: var(--light-gray-70); font-size: 13px; }
.steps li.now, .steps li.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }

/* cocina (KDS) */
.kds-body { background: var(--smoky-black); font-size: 17px; }
.kds-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 16px; margin: 12px 12px 0; position: sticky; top: 12px; z-index: 20; background: rgba(30, 30, 30, .75); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.kds-title { display: flex; gap: 12px; align-items: center; font-size: 22px; color: var(--white-2); }
.kds-title img { border-radius: 10px; filter: drop-shadow(0 0 10px hsla(203, 88%, 47%, .45)); }
.kds-filters { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); flex-wrap: wrap; }
.kds-right { display: flex; gap: 8px; align-items: center; }
.kf { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px; color: var(--light-gray); font-weight: 700; min-height: 44px; transition: all .2s; }
.kf:hover { color: var(--white-1); }
.kf i { font-style: normal; font-family: var(--mono); font-size: 12px; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 0 8px; }
.kf.on { background: var(--white-2); color: var(--smoky-black); } .kf.on i { background: rgba(0, 0, 0, .15); }
.conn { font-size: 13px; color: hsl(0, 70%, 70%); } .conn.on { color: var(--ok); }
.offline-bar { background: var(--danger); padding: 8px 14px; text-align: center; font-weight: 700; margin: 12px 12px 0; border-radius: 12px; }
.kds-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding: 16px 12px 40px; align-items: start; }
.kcard { background: rgba(30, 30, 30, .65); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: up .4s var(--ease) both; }
.kcard.ks-new { border-color: hsla(38, 90%, 55%, .8); }
.kcard.ks-accepted { border-color: hsla(203, 88%, 47%, .8); }
.kcard.ks-preparing { border-color: hsla(270, 70%, 65%, .8); }
.kcard.ks-ready { border-color: hsla(152, 62%, 44%, .85); }
.kcard.late { box-shadow: 0 0 0 3px hsla(0, 70%, 50%, .5), 0 10px 40px rgba(0, 0, 0, .35); animation: pulse 2s infinite; }
.kcard.new-in { animation: flash 1.5s; }
.kc-head { display: flex; justify-content: space-between; gap: 8px; }
.kc-num { color: var(--light-gray-70); } .kc-table { font-size: 24px; color: var(--white-2); }
.kc-time { text-align: right; display: flex; flex-direction: column; font-size: 13px; } .kc-time .elapsed { font-size: 19px; font-family: var(--mono); color: var(--white-2); }
.kc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.kc-badges span, .kc-mod, .kc-cancel, .kc-alg, .kc-late { font-size: 12px; font-weight: 800; padding: 2px 9px; border-radius: 8px; background: var(--onyx); color: var(--light-gray); }
.kc-mod { background: hsla(38, 90%, 55%, .2); color: var(--warn); }
.kc-late, .kc-cancel { background: hsla(0, 43%, 51%, .25); color: hsl(0, 70%, 78%); }
.kc-alg { background: hsla(25, 90%, 55%, .2); color: hsl(25, 95%, 65%); }
.kc-notes { margin: 0; padding: 10px; border-radius: 10px; background: hsla(38, 90%, 55%, .12); border: 1px solid hsla(38, 90%, 55%, .3); }
.kc-items { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ki { padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line); position: relative; }
.ki-qty { font-size: 20px; color: var(--accent); } .ki-name { font-size: 19px; font-weight: 700; color: var(--white-2); }
.ki-opt { margin-left: 26px; color: var(--light-gray); } .ki-note { margin-left: 26px; color: hsl(38, 90%, 75%); font-style: italic; } .ki-alg { margin-left: 26px; color: hsl(25, 95%, 65%); font-weight: 700; }
.ki-st { position: absolute; right: 10px; top: 10px; font-size: 11px; color: var(--light-gray-70); }
.ki-cancelled { opacity: .6; border-style: dashed; } .ki-cancelled .ki-name { text-decoration: line-through; }
.kc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kbtn { flex: 1; min-height: 56px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .05); color: var(--accent); font-size: 18px; font-weight: 800; padding: 8px 14px; text-align: center; transition: all .25s; }
.kbtn:hover:not([disabled]) { background: var(--accent); color: var(--smoky-black); transform: translateY(-1px); }
.kbtn.go { background: linear-gradient(135deg, hsl(203, 88%, 52%), hsl(203, 88%, 40%)); color: #fff; border-color: transparent; box-shadow: 0 8px 22px hsla(203, 88%, 47%, .3); }
.kbtn.undo, .kbtn.ack { flex: 0 0 auto; font-size: 14px; min-height: 48px; }
.kbtn[disabled] { opacity: .5; cursor: not-allowed; }
.kds-empty { grid-column: 1 / -1; text-align: center; padding: 80px 10px; color: var(--light-gray-70); display: flex; flex-direction: column; gap: 6px; font-size: 18px; } .kds-empty i { font-size: 56px; }
.station-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.station-pick a { padding: 26px; text-align: center; font-size: 22px; font-weight: 800; }

/* adaptable */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; padding: 8px 12px; position: sticky; top: 8px; z-index: 30; }
  .mobile-bar b { font-size: 17px; color: var(--white-2); }
  .side { position: fixed; left: 12px; top: 12px; bottom: 12px; width: min(290px, 86vw); height: auto; z-index: 60; transform: translateX(-120%); transition: transform .3s var(--ease); background: rgba(24, 24, 26, .98); }
  .side.open { transform: none; }
  .page-head h1 { font-size: 26px; }
  #toasts { left: 12px; right: 12px; justify-items: stretch; }
  .c-cart { position: static; }
  .kds-top { margin: 8px 8px 0; top: 8px; }
}
@media (max-width: 640px) { .card { padding: 16px; } .card.flush { padding: 4px; } .modal-head, .modal-body, .modal-foot { padding-inline: 16px; } }
@media (prefers-reduced-motion: reduce) { .login-logo, .kcard, .login .box { animation: none !important; } }
