/* Camarero — específico. Base de componentes en ../shared/tokens.css */
.error { color: var(--danger); min-height: 1.2em; }
.empty { color: var(--muted); }

#login { max-width: 360px; margin: 18vh auto 0; padding: 24px; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
#login input { width: 100%; padding: 12px; font-size: 16px; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
#login button { width: 100%; }

#app-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--brand-700); color: #fff; position: sticky; top: 0; z-index: 10; }
#app-header .waiter { font-weight: 600; }
#app-header .btn-ghost { color: #fff; }

section { padding: 16px; max-width: 900px; margin: 0 auto; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.tile .t-num { font-size: 24px; font-weight: 700; }
.tile .t-state { font-size: 13px; }

/* Cabecera de contexto fija de la cuenta */
#acct-context { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; background: var(--brand-700); color: #fff; padding: 10px 12px; border-radius: 0 0 var(--r-md) var(--r-md); margin: -16px -16px 12px; }
#acct-context .btn-ghost { color: #fff; font-size: 20px; }
#acct-context .acct-mesa { font-weight: 700; }
#acct-context .acct-total { margin-left: auto; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; font-weight: 700; }

.segmented { margin-bottom: 12px; }
#step-rail { margin-bottom: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }

/* Dejar hueco bajo las barras fijas */
#pane-add, #pane-account { padding-bottom: 84px; }

/* Hoja de cantidad */
.add-label { font-weight: 700; display: block; margin-bottom: 8px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.qty-row input { width: 72px; padding: 10px; font-size: 18px; text-align: center; border: 1px solid var(--border); border-radius: var(--r-md); }
#add-sheet input[type="text"] { width: 100%; padding: 10px; font-size: 16px; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; }
.sheet-actions { display: flex; justify-content: space-between; gap: 10px; }

/* Barras fijas */
.actionbar { display: flex; align-items: center; gap: 10px; }
.actionbar .btn-primary, .actionbar .btn-ok { flex: 1; }
.cart-summary { min-height: var(--tap); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--brand-100); color: var(--brand-700); font-weight: 700; padding: 0 14px; white-space: nowrap; }
.cobro-methods { position: fixed; left: 0; right: 0; bottom: 60px; background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-up); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; z-index: 25; }
.cobro-q { width: 100%; font-weight: 600; }
.pay-btn { flex: 1; min-width: 120px; min-height: var(--tap); border: 1px solid var(--ok); background: var(--ok-bg); border-radius: var(--r-md); font-size: 16px; }

/* Listas de líneas */
#cart-list, #acct-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cart-line, .acct-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border-radius: var(--r-sm); background: var(--bg); }
.cl-qty, .al-qty { font-weight: 800; color: var(--brand-700); min-width: 28px; }
.cl-name, .al-name { flex: 1 1 auto; }
.cl-notes { color: var(--warn); font-size: 13px; width: 100%; }
.cl-price, .al-price { font-variant-numeric: tabular-nums; }
.cl-del { margin-left: auto; }
.al-station { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.acct-line.done { opacity: .55; text-decoration: line-through; color: var(--ok); }
.acct-round { border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px; margin-bottom: 8px; list-style: none; }
.acct-round.cancelled { background: var(--danger-bg); }
.ar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ronda-anulada { color: var(--danger); font-weight: 700; }
.acct-anulado { color: var(--danger); text-decoration: line-through; opacity: .85; }
.acct-anulado .al-price { text-decoration: none; font-weight: 700; }
.cancel-item { font-size: .8rem; padding: 2px 6px; }
#anular-sheet input[type="text"] { width: 100%; padding: 10px; font-size: 16px; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; }
.acct-code { text-align: center; color: var(--muted); margin-top: 12px; }
.acct-code strong { color: var(--text); font-size: 20px; letter-spacing: .1em; }

/* Pie legal RGPD (s33) */
.legal-footer { text-align: center; padding: 14px 8px; font-size: .82rem; }
.legal-footer a { color: var(--muted); text-decoration: none; }
.legal-footer a:hover { text-decoration: underline; }

/* Autopedido */
#bell { position: relative; }
.ap-card { border: 1px solid var(--border); border-radius: 10px; padding: .6rem .75rem; margin: .5rem 0; }
.ap-head { margin-bottom: .25rem; }
.ap-items { font-size: .9rem; color: var(--muted); margin-bottom: .5rem; }
.ap-actions { display: flex; gap: .5rem; }
