/* CafeManager · Pantalla de cocina. Mismo sistema visual que la caja (espresso + caramelo), en modo oscuro
   para lucir a distancia y no deslumbrar. Texto ≥ 4.5:1; estados con color + texto. */
:root {
    --bg: #17110D;
    --panel: #1F1712;
    --card: #2A2019;
    --card-2: #33271F;
    --line: #43352B;
    --text: #F5EFE9;
    --muted: #B9A99A;
    --caramel: #F2B47A;
    --caramel-strong: #B45309;
    --received: #38BDF8;
    --confirmed: #F2B47A;
    --preparing: #FBBF24;
    --ready: #4ADE80;
    --go: #15803D;
    --warn: #F59E0B;
    --late: #EF4444;
    --focus: #60A5FA;
    --radius: 16px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.loading { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.brand { display: flex; align-items: center; gap: 10px; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; font-weight: 600; font-size: 18px; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand .m { color: var(--caramel); font-weight: 400; }

/* ---------- inicio de sesión */
.login-wrap { min-height: 100vh; display: grid; place-content: center; background: radial-gradient(80% 60% at 50% 0%, #3A2A1F 0%, var(--bg) 70%); }
.login { width: 380px; background: var(--panel); padding: 32px; border-radius: 22px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .45); }
.login .logo { width: 64px; height: 64px; border-radius: 16px; margin-bottom: 8px; }
.login h1 { margin: 0 0 2px; font-size: 24px; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.login label { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.login input { min-height: 50px; font-size: 18px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.login input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px rgba(96, 165, 250, .3); }
.login button { margin-top: 14px; min-height: 54px; font-size: 18px; border: none; border-radius: 14px; background: var(--caramel-strong); color: #fff; font-weight: 700; cursor: pointer; }
.login button:disabled { opacity: .6; }
.error { color: #FCA5A5; background: rgba(239, 68, 68, .12); border-radius: 10px; padding: 10px 12px; }

/* ---------- barra superior */
.bar { display: flex; align-items: center; gap: 18px; padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.filters { display: flex; gap: 6px; background: var(--bg); padding: 4px; border-radius: 14px; }
.filter { min-height: 44px; padding: 0 20px; border-radius: 10px; border: none; background: transparent; color: var(--muted); font-size: 16px; font-weight: 600; cursor: pointer; }
.filter.on { background: var(--card-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 12px; border-radius: 20px; background: var(--card); }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.status.ok::before { background: var(--ready); }
.status.off::before { background: var(--late); }
.clock { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.user { color: var(--muted); font-size: 14px; }
.ghost { min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 15px; }

.toast { margin: 12px 20px 0; padding: 12px 16px; border-radius: 12px; background: rgba(239, 68, 68, .16); border: 1px solid var(--late); color: #FECACA; cursor: pointer; font-weight: 600; }

/* ---------- tablero */
.board { display: grid; grid-template-columns: repeat(4, minmax(270px, 1fr)); gap: 14px; padding: 16px 20px; align-items: start; }
@media (max-width: 1150px) { .board { grid-template-columns: repeat(2, minmax(270px, 1fr)); } }
.column { background: rgba(255, 255, 255, .02); border-radius: 18px; padding: 10px; min-height: 60vh; }
.column h2 { display: flex; align-items: center; gap: 10px; margin: 4px 6px 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.column h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--muted)); }
.column.s-Received { --c: var(--received); }
.column.s-Confirmed { --c: var(--confirmed); }
.column.s-Preparing { --c: var(--preparing); }
.column.s-Ready { --c: var(--ready); }
.count { margin-left: auto; background: var(--card); color: var(--text); border-radius: 12px; padding: 2px 10px; font-size: 14px; }

.ticket { background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; border: 1px solid var(--line); border-top: 4px solid var(--c, var(--caramel)); animation: pop .3s cubic-bezier(.2, .8, .2, 1); }
.ticket.warn { border-color: var(--warn); border-top-color: var(--warn); }
.ticket.late { border-color: var(--late); border-top-color: var(--late); box-shadow: 0 0 0 1px var(--late); }
.head { display: flex; justify-content: space-between; align-items: center; }
.num { font-size: 30px; font-weight: 800; font-family: "Segoe UI Variable Display", "Segoe UI", sans-serif; }
.age { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--muted); background: var(--card-2); padding: 4px 10px; border-radius: 10px; font-variant-numeric: tabular-nums; }
.ticket.warn .age { color: #FDE68A; background: rgba(245, 158, 11, .18); }
.ticket.late .age { color: #FECACA; background: rgba(239, 68, 68, .2); }
.ticket.late .age::after { content: "· demorado"; }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0 8px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 8px; margin-right: 6px; background: rgba(56, 189, 248, .16); color: #BAE6FD; }
.ticket ul { list-style: none; margin: 0; padding: 0; }
.ticket li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 18px; }
.ticket li strong { color: var(--caramel); margin-right: 4px; }
.ticket li.other { opacity: .35; }
.mods { color: var(--muted); font-size: 15px; margin-left: 30px; }
.note { color: #FDE68A; background: rgba(245, 158, 11, .14); border-radius: 8px; padding: 4px 8px; font-size: 15px; margin-top: 4px; display: inline-block; }
.due { margin-top: 8px; color: #FDE68A; font-size: 14px; font-weight: 600; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions button { flex: 1; min-height: 54px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: 17px; font-weight: 700; cursor: pointer; }
.actions button.go { background: var(--go); border-color: var(--go); }
.actions button:active { transform: scale(.98); }
.empty { color: var(--muted); text-align: center; padding: 28px 8px; font-size: 14px; border: 1px dashed var(--line); border-radius: 14px; }

@keyframes pop { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

#blazor-error-ui { background: #5D4037; bottom: 0; display: none; left: 0; padding: .6rem 1.25rem; position: fixed; width: 100%; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* ---------- modo rápido (una sola persona) */
.board.quick { grid-template-columns: repeat(2, minmax(300px, 1fr)); }
.board.quick .column { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; align-content: start; }
.board.quick .column h2, .board.quick .column .empty { grid-column: 1 / -1; }
.board.quick .ticket { margin-bottom: 0; }
.filter.quick { border: 1px solid var(--line); }
.filter.quick.on { background: var(--caramel); color: #1F1712; box-shadow: none; border-color: var(--caramel); }
.hint { flex: 2; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 54px; padding: 0 8px; border-radius: 12px; border: 1px dashed var(--line); color: #FDE68A; font-size: 14px; font-weight: 600; }
@media (max-width: 760px) { .board.quick { grid-template-columns: 1fr; } }
