/* Letras de la marca, las mismas que Alright Rest y COOK */
@font-face { font-family:'Yellowtail'; src:url(/fonts/yellowtail-latin-400-normal.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'DM Sans'; font-weight:400; src:url(/fonts/dm-sans-latin-400-normal.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'DM Sans'; font-weight:500; src:url(/fonts/dm-sans-latin-500-normal.woff2) format('woff2'); font-display:swap; }
@font-face { font-family:'DM Sans'; font-weight:700; src:url(/fonts/dm-sans-latin-700-normal.woff2) format('woff2'); font-display:swap; }
/* Tema claro (por defecto) y oscuro. El oscuro usa la paleta de Alright Rest. Lo pone /tema.js en <html data-theme>. */
:root { color-scheme:light; --bg:#f5f6fa; --card:#fff; --input:#fff; --ink:#1d2433; --mute:#6b7385; --line:#e3e6ee; --soft:var(--soft); --off:var(--off); --tile:var(--tile); --hover:var(--hover);
  --brand:#B82222; --brand2:#951b1b; --brand-soft:var(--brand-soft); --firma:#B82222; --ok:#1e9e5a; --bad:#d6342c; --warn:#e69a00; --toast:#1d2433; --shadow:rgba(20,24,40,.15);
  --sales-bg:#e8f5ee; --sales-h:#157a46; --restock-bg:#fff4dc; --restock-h:#9a6400; --todo-bg:#e8effb; --todo-h:#2c54a8; }
:root[data-theme="dark"] { color-scheme:dark; --bg:#0E0E0E; --card:#1A1A1A; --input:#161616; --ink:#F5F1EA; --mute:#A39C90; --line:#2A2A2A; --soft:#161616; --off:#131313; --tile:#222; --hover:#262626;
  --brand:#D62828; --brand2:#b51f1f; --brand-soft:#3a1616; --firma:#FF5A4D; --ok:#5ccf8f; --bad:#ff6b6b; --warn:#f0b04a; --toast:#2a2a2a; --shadow:rgba(0,0,0,.5);
  --sales-bg:#12261a; --sales-h:#8FE0B0; --restock-bg:#2a2110; --restock-h:#f0c060; --todo-bg:#121c2e; --todo-h:#9db8f0; }
* { box-sizing:border-box; }
body { margin:0; font:14px/1.4 'DM Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif; background:var(--bg); color:var(--ink); }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; border:1px solid var(--line); background:var(--input); border-radius:8px; padding:7px 12px; color:var(--ink); }
button:hover { background:var(--hover); }
button.primary { background:var(--brand); color:#fff; border-color:var(--brand); }
button.primary:hover { background:var(--brand2); }
button.danger { color:var(--bad); }
button.small { padding:3px 8px; font-size:12px; }
input,select,textarea { border:1px solid var(--line); border-radius:8px; padding:7px 9px; background:var(--input); color:var(--ink); width:100%; }
label { display:block; font-size:12px; color:var(--mute); margin:8px 0 3px; }
.hidden { display:none !important; }
header.top { display:flex; align-items:center; gap:14px; padding:14px 24px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; flex-wrap:wrap; }
header.top .logo { font-weight:800; font-size:18px; color:var(--brand); }
header.top select { width:auto; }
nav { display:flex; gap:2px; flex-wrap:wrap; }
nav button { border:0; background:none; border-radius:6px; padding:8px 11px; }
nav button.on { color:var(--brand); background:var(--brand-soft); font-weight:600; }
.spacer { flex:1; }
main { padding:14px 16px 40px; max-width:1500px; margin:0 auto; }
.card { background:var(--card); border:1px solid var(--line); border-radius:12px; padding:14px; }
.bar { display:flex; align-items:center; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.bar h2 { margin:0 8px 0 0; font-size:18px; }
.login { max-width:380px; margin:12vh auto; }
.login h1 { color:var(--brand); margin:0 0 4px; }
.err { color:var(--bad); font-size:13px; min-height:18px; }
/* planificación */
.grid { overflow:auto; border:1px solid var(--line); border-radius:12px; background:var(--card); }
table.plan { border-collapse:collapse; width:100%; min-width:900px; }
table.plan th, table.plan td { border-bottom:1px solid var(--line); border-right:1px solid var(--line); padding:4px; vertical-align:top; }
table.plan th { background:var(--soft); font-weight:600; position:sticky; top:0; z-index:2; }
table.plan th.today { color:var(--brand); }
table.plan th.off, table.plan td.off { background:var(--off); }
td.emp { width:170px; min-width:150px; background:var(--soft); position:sticky; left:0; z-index:1; }
td.emp .n { font-weight:600; } td.emp small { color:var(--mute); }
td.cell { min-width:118px; height:54px; cursor:pointer; }
td.cell.over { outline:2px dashed var(--brand); outline-offset:-3px; }
td.tot { width:90px; text-align:center; font-weight:600; }
.shift { color:#1d2433; border-radius:6px; padding:3px 6px; margin-bottom:3px; font-size:12px; cursor:grab; border-left:4px solid rgba(0,0,0,.25); }
.shift b { display:block; } .shift small { opacity:.8; }
.shift.draft { outline:1px dashed rgba(0,0,0,.35); }
.shift.abs { cursor:pointer; }
.pill { display:inline-block; border-radius:10px; padding:1px 8px; font-size:12px; color:#1d2433; }
.over-h { color:var(--bad); } .under-h { color:var(--warn); } .ok-h { color:var(--ok); }
tfoot td { background:var(--soft); font-weight:600; text-align:center; }
/* tablas */
table.list { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
table.list th, table.list td { text-align:left; padding:8px 10px; border-bottom:1px solid var(--line); }
table.list th { background:var(--soft); font-size:12px; color:var(--mute); }
.cols { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.modal { position:fixed; inset:0; background:rgba(20,24,40,.45); display:flex; align-items:center; justify-content:center; z-index:20; padding:12px; }
.modal .box { background:var(--card); border-radius:14px; padding:18px; width:100%; max-width:520px; max-height:92vh; overflow:auto; }
.modal h3 { margin:0 0 6px; }
.modal .actions { display:flex; gap:8px; justify-content:flex-end; margin-top:14px; }
.toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background:var(--toast); color:#fff; padding:10px 16px; border-radius:10px; z-index:30; }
.toast.err { background:var(--bad); }
.muted { color:var(--mute); }
.chips { display:flex; gap:6px; flex-wrap:wrap; }
@media (max-width:700px) { .cols { grid-template-columns:1fr; } main { padding:10px 8px 40px; } }
/* tablet de fichaje */
body.kiosk { background:#1d2433; color:#fff; display:flex; flex-direction:column; align-items:center; min-height:100vh; padding:20px; }
.kiosk h1 { margin:6px 0; } .kiosk .clock { font-size:54px; font-weight:700; }
/* Sin grid ni gap: así se ve igual en tablets antiguas */
.kiosk #main { display:-webkit-flex; display:flex; -webkit-flex-direction:column; flex-direction:column; -webkit-align-items:center; align-items:center; width:100%; }
.kiosk .pad { width:306px; margin-top:14px; text-align:center; font-size:0; }
.kiosk .pad button { width:92px; height:76px; margin:5px; font-size:28px; background:#2d3650; border:0; color:#fff; border-radius:14px; touch-action:manipulation; -webkit-tap-highlight-color:transparent; vertical-align:top; }
.kiosk .pad button.ok { background:#2f6b4a; }
.kiosk .pad button:active { background:#B82222; background:var(--brand); }
.kiosk .pad button:disabled { opacity:.5; }
.kiosk .dots { font-size:36px; letter-spacing:10px; height:48px; }
.kiosk .msg { font-size:22px; min-height:34px; margin-top:12px; text-align:center; max-width:560px; }
.kiosk select { width:auto; font-size:18px; }
.kiosk .where { font-size:20px; font-weight:700; margin-top:4px; }
.kiosk .foot { margin-top:auto; padding-top:18px; font-size:13px; color:#9aa3b8; }
.kiosk .foot a { color:#9aa3b8; }
.kiosk .setup { width:100%; max-width:380px; margin-top:12px; }
.kiosk .setup h2 { text-align:center; margin:8px 0; }
.kiosk .setup label { display:block; margin:12px 0 4px; color:#cfd5e3; font-size:15px; }
.kiosk .setup label.inline { display:block; font-size:15px; }
.kiosk .setup label.inline input { width:auto; margin-right:6px; }
.kiosk .setup input, .kiosk .setup select { width:100%; font-size:18px; padding:10px; border-radius:10px; border:0; box-sizing:border-box; }
.kiosk .setup button { width:100%; margin-top:16px; font-size:18px; padding:12px; border-radius:10px; border:0; background:#B82222; background:var(--brand); color:#fff; }
.kiosk .setup button.link { background:none; color:#9aa3b8; text-decoration:underline; }
.kiosk .muted-k { color:#cfd5e3; font-size:15px; text-align:center; }

.brand { height:56px; width:auto; display:block; margin-right:6px; }
.brand-lg { height:90px; width:auto; display:block; margin:0 auto 10px; }
.kiosk .brand-k { height:70px; background:#fff; border-radius:12px; padding:8px 14px; }

.tools { display:flex; align-items:center; gap:6px; }
.icon-btn { width:38px; height:38px; padding:0; border:0; border-radius:50%; background:none; color:var(--mute); display:flex; align-items:center; justify-content:center; }
.icon-btn:hover { background:var(--hover); color:var(--ink); }
.icon-btn.on { background:var(--brand-soft); color:var(--brand); }
.avatar { width:38px; height:38px; padding:0; border-radius:50%; background:var(--brand); color:#fff; border:0; font-weight:700; }
.avatar:hover { background:var(--brand2); }
.user-menu { position:absolute; right:0; top:46px; min-width:220px; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 8px 24px var(--shadow); padding:6px; z-index:15; display:flex; flex-direction:column; }
.user-menu.hidden { display:none; }
.user-menu .um-head { padding:8px 10px; border-bottom:1px solid var(--line); margin-bottom:4px; display:flex; flex-direction:column; }
.user-menu button, .user-menu a { text-align:left; border:0; background:none; padding:8px 10px; border-radius:8px; color:var(--ink); text-decoration:none; font-size:14px; }
.user-menu button:hover, .user-menu a:hover { background:var(--hover); }
.user-menu .danger { color:var(--bad); }

.camwrap { display:-webkit-flex; display:flex; -webkit-align-items:center; align-items:center; margin-top:6px; }
.camwrap > * + * { margin-left:10px; }
.kiosk video { width:120px; height:90px; object-fit:cover; border-radius:10px; background:#000; transform:scaleX(-1); }
.kiosk .camwrap button { background:#2d3650; color:#fff; border:0; }
.thumb { width:34px; height:26px; object-fit:cover; border-radius:4px; cursor:pointer; vertical-align:middle; border:1px solid var(--line); }
.cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:12px; }
.stat { display:flex; gap:16px; margin:8px 0; } .stat div { text-align:center; } .stat b { display:block; font-size:24px; }
.todo { display:flex; justify-content:space-between; align-items:center; padding:6px 0; border-bottom:1px solid var(--line); }
.todo:last-child { border-bottom:0; }
.badge { background:var(--brand); color:#fff; border-radius:10px; padding:1px 8px; font-size:12px; }
.badge.zero { background:var(--line); color:var(--mute); }
.shift small { display:block; }

/* Paneles de centro en el Inicio */
.cards.centers { gap:18px; }
@media (min-width:1150px) { .cards.centers { grid-template-columns:repeat(4, minmax(0, 1fr)); } }
.cpanel { padding:0; overflow:hidden; border-radius:16px; border:1px solid var(--line); box-shadow:0 4px 14px rgba(20,24,40,.08); display:flex; flex-direction:column; transition:box-shadow .15s, transform .15s; }
.cpanel:hover { box-shadow:0 8px 22px rgba(20,24,40,.14); transform:translateY(-1px); }
.cpanel .ch { background:linear-gradient(135deg,#B82222,#8d1818); color:#fff; padding:14px 16px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.cpanel.kitchen .ch { background:linear-gradient(135deg,#3b4152,#22252e); }
.cpanel .ch strong { font-size:17px; letter-spacing:.01em; }
.cpanel .ch small { opacity:.85; }
.pill-alert { background:rgba(255,255,255,.22); color:#fff; border-radius:12px; padding:3px 10px; font-size:12px; font-weight:600; white-space:nowrap; }
.pill-alert.hot { background:#fff; color:var(--brand); }
.cpanel .cb { padding:4px 16px 16px; }
.cpanel .sec { padding:12px 0; }
.cpanel .sec + .sec { border-top:1px solid var(--line); }
.cpanel .sec h5 { margin:0 0 8px; font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); }
.cpanel .stat { display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; margin:0 0 8px; }
.cpanel .stat div { text-align:center; font-size:11px; color:var(--mute); background:var(--tile); border-radius:10px; padding:8px 2px; }
.cpanel .stat b { display:block; font-size:22px; color:var(--ink); line-height:1.1; }
.cpanel .stat b.ok { color:var(--ok); } .cpanel .stat b.bad { color:var(--bad); }
.cpanel.wide { grid-column:1 / -1; }
@media (min-width:1150px) {
  .cpanel.wide .cb { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:0 28px; }
  .cpanel.wide .sec + .sec { border-top:0; }
}

.ch-name { display:flex; align-items:center; gap:12px; min-width:0; }
.ch-logo { height:34px; width:auto; flex:none; filter:brightness(0) invert(1); }   /* logo en blanco sobre la banda roja */

/* Secciones con color de fondo propio */
.cpanel .sec-sales, .cpanel .sec-restock, .cpanel .sec-todo { border-radius:12px; padding:12px 14px; margin:10px 0 0; border-top:0; border-left:4px solid; }
.cpanel .sec-sales { background:var(--sales-bg); border-color:#1e9e5a; }
.cpanel .sec-sales h5 { color:var(--sales-h); }
.cpanel .sec-restock { background:var(--restock-bg); border-color:#e69a00; }
.cpanel .sec-restock h5 { color:var(--restock-h); }
.cpanel .sec-todo { background:var(--todo-bg); border-color:#3b6fd4; }
.cpanel .sec-todo h5 { color:var(--todo-h); }
.cpanel .sec-sales .todo, .cpanel .sec-restock .todo, .cpanel .sec-todo .todo { border-bottom-color:rgba(0,0,0,.08); }
.cpanel .sec-sales .badge.zero, .cpanel .sec-restock .badge.zero, .cpanel .sec-todo .badge.zero { background:rgba(0,0,0,.09); }
.cpanel .sec-sales button, .cpanel .sec-restock button, .cpanel .sec-todo button { background:var(--card); }
@media (min-width:1150px) { .cpanel.wide .sec-sales, .cpanel.wide .sec-restock, .cpanel.wide .sec-todo { margin-top:10px; } }

.cpanel .billing { background:var(--tile); border-radius:10px; padding:6px 12px; margin:0 0 10px; }
.cpanel .billing .todo { border-bottom-color:var(--line); }

/* Facturación como cuadros, igual que los de Hoy */
.cpanel .billing { background:none; padding:0; margin:0 0 10px; }
.cpanel .stat2 { grid-template-columns:repeat(2, 1fr); margin:0; }
.cpanel .tile { text-align:center; font-size:11px; color:var(--mute); background:var(--tile); border:1px solid transparent; border-radius:10px; padding:10px 4px; cursor:pointer; }
.cpanel .tile:hover { background:var(--card); border-color:var(--brand); }
.cpanel .tile b { display:block; font-size:22px; color:var(--ink); line-height:1.15; }
.demo-note { font-size:11px; color:var(--mute); margin-top:4px; text-align:center; font-style:italic; }

@media (max-width:640px) { .brand { height:44px; } header.top { padding:10px 14px; } }

/* Título de la app: el logo de Alright y «equipo» en letra de mano, como «rest» y «cook» */
.marca { display:flex; align-items:center; gap:8px; text-decoration:none; }
.marca img { height:44px; width:auto; display:block; }
.marca .firma { font-family:'Yellowtail',cursive; font-size:32px; line-height:1; color:var(--firma); transform:translateY(4px); }
.marca-lg { justify-content:center; margin:0 auto 10px; }
.marca-lg img { height:70px; } .marca-lg .firma { font-size:46px; }
:root[data-theme="dark"] .logo-claro, :root:not([data-theme="dark"]) .logo-oscuro { display:none; }
@media (max-width:640px) { .marca img { height:34px; } .marca .firma { font-size:26px; } }
