/* TuCartaQR · panel del restaurante (pensado para el móvil) */
:root {
	--p-bg: #f4f1ec;
	--p-surface: #fff;
	--p-text: #1f1a16;
	--p-muted: #6d6258;
	--p-line: #e6ded3;
	--p-dark: #1f1a16;
	--p-accent: #a4452c;
	--p-on-accent: #fff;
	--p-ok: #1f7a3c;
	--p-bad: #b3261e;
	--p-radius: 14px;
	--p-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--p-bg); color: var(--p-text); font: 16px/1.4 var(--p-font); -webkit-font-smoothing: antialiased; }
body.has-sheet { overflow: hidden; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--p-accent); outline-offset: 2px; }
.p-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.p-app { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.p-loading, .p-error { padding: 80px 24px; text-align: center; color: var(--p-muted); }
.p-error .p-btn { margin-top: 16px; }

/* Cabecera */
.p-top {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
	padding: max(18px, env(safe-area-inset-top)) 18px 16px;
	background: var(--p-dark); color: #fff;
}
.p-top__kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.p-top h1 { font-size: 22px; line-height: 1.15; margin-top: 2px; }
.p-top__link { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; white-space: nowrap; }

.p-main { max-width: 640px; margin: 0 auto; }
.p-view { padding: 0 14px 24px; }

/* Pestañas inferiores */
.p-tabs {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: grid; grid-template-columns: repeat(4, 1fr);
	background: var(--p-surface); border-top: 1px solid var(--p-line);
	padding-bottom: env(safe-area-inset-bottom);
}
.p-tab { border: 0; background: none; padding: 8px 4px 10px; font-size: 12.5px; font-weight: 600; color: var(--p-muted); display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; cursor: pointer; }
.p-tab__i { font-size: 20px; line-height: 1; }
.p-tab[aria-current="page"] { color: var(--p-accent); }

/* Buscar y resumen */
.p-searchbar { position: sticky; top: 0; z-index: 10; background: var(--p-bg); padding: 12px 0 8px; }
.p-search { width: 100%; padding: 12px 14px; border: 1px solid var(--p-line); border-radius: 12px; background: var(--p-surface); font-size: 16px; }
.p-summary { color: var(--p-muted); font-size: 14px; padding: 2px 2px 8px; }
.p-summary strong { color: var(--p-bad); }
.p-empty { color: var(--p-muted); text-align: center; padding: 40px 12px; }

/* Barra de resumen */
.p-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 4px; }
.p-summary-row .p-summary { padding: 0 2px; }

/* Cartas y secciones */
.p-secs { display: grid; gap: 14px; }
.p-secs__carta { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 6px 8px 10px; display: grid; gap: 4px; }
.p-secs__list { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--p-line); margin-left: 8px; }
.p-secs__add { justify-self: start; margin-left: 18px; }
.p-secrow { display: flex; align-items: center; gap: 2px; }
.p-secrow__name { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; padding: 8px 6px; border-radius: 8px; cursor: pointer; }
.p-secrow__name:hover { background: var(--p-bg); }
.p-secrow--top .p-secrow__name strong { font-size: 17px; }
.p-secrow__name small { color: var(--p-muted); font-size: 12.5px; }
.p-icon-btn:disabled { opacity: .25; cursor: default; }
.p-chip--add { border-style: dashed; background: transparent; color: var(--p-accent); font-weight: 650; }
.p-addchip.is-open { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; }
.p-form .p-addchip__input { flex: 1; min-width: 0; padding: 8px 10px; }

/* Lista de platos */
.p-group { margin-top: 14px; }
.p-group__title { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--p-muted); padding: 6px 2px; }
.p-sec { font-size: 16px; padding: 12px 2px 6px; }
.p-dishes { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); overflow: hidden; }
.p-dish { display: flex; align-items: center; gap: 8px; padding-right: 12px; border-top: 1px solid var(--p-line); }
.p-dish:first-child { border-top: 0; }
.p-dish__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 10px 0 10px 12px; cursor: pointer; }
.p-dish__img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: 0 0 48px; background: var(--p-bg); }
.p-dish__img--none { display: grid; place-items: center; color: var(--p-muted); font-size: 20px; border: 1px dashed var(--p-line); }
.p-dish__text { min-width: 0; display: flex; flex-direction: column; }
.p-dish__text strong { font-size: 15.5px; line-height: 1.25; }
.p-dish__text small { color: var(--p-muted); font-size: 13px; margin-top: 2px; }
.p-dish.is-out .p-dish__text strong { text-decoration: line-through; color: var(--p-muted); }

/* Interruptor */
.p-sw { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; position: relative; min-height: 44px; }
.p-sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-sw__track { width: 46px; height: 28px; border-radius: 999px; background: #c9c1b6; position: relative; flex: 0 0 46px; transition: background .2s; }
.p-sw__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.p-sw input:checked + .p-sw__track { background: var(--p-ok); }
.p-sw input:checked + .p-sw__track::after { transform: translateX(18px); }
.p-sw input:focus-visible + .p-sw__track { outline: 3px solid var(--p-accent); outline-offset: 2px; }
.p-sw input:disabled + .p-sw__track { opacity: .5; }
.p-sw__label { font-size: 14.5px; }
.p-sw--row { flex-direction: column-reverse; align-items: center; gap: 2px; min-width: 76px; }
.p-sw--row .p-sw__track { flex: none; }
.p-sw--row .p-sw__label { font-size: 11.5px; color: var(--p-muted); font-weight: 600; }
.p-dish.is-out .p-sw--row .p-sw__label { color: var(--p-bad); }

/* Botones */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--p-line); background: var(--p-surface); font-weight: 650; cursor: pointer; text-decoration: none; }
.p-btn--primary { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-on-accent); }
.p-btn--ghost { background: transparent; }
.p-btn--danger-ghost { background: transparent; color: var(--p-bad); border-color: transparent; }
.p-btn--sm { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.p-btn:disabled { opacity: .6; }
.p-icon-btn { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: var(--p-muted); }
.p-fab {
	position: fixed; right: 16px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 25;
	border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 700; font-size: 16px;
	background: var(--p-accent); color: var(--p-on-accent); box-shadow: 0 6px 20px rgba(0,0,0,.22); cursor: pointer;
}
.p-actions { display: grid; gap: 10px; margin-top: 18px; }

/* Hojas (pantallas que se abren encima) */
.p-sheet {
	position: fixed; inset: 0; z-index: 50; background: var(--p-bg);
	display: flex; flex-direction: column;
	animation: p-in .2s ease-out;
}
.p-sheet.is-leaving { animation: p-out .18s ease-in forwards; }
@keyframes p-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes p-out { to { transform: translateY(24px); opacity: 0; } }
.p-sheet--small { top: auto; max-height: 88vh; border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.25); }
.p-sheet__head { display: flex; align-items: center; gap: 6px; padding: max(8px, env(safe-area-inset-top)) 10px 8px; background: var(--p-surface); border-bottom: 1px solid var(--p-line); }
.p-sheet__head h2 { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sheet__body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px 28px; }
.p-sheet__body > * { max-width: 640px; margin-left: auto; margin-right: auto; }
.p-sheet__foot { background: var(--p-surface); border-top: 1px solid var(--p-line); padding: 10px 14px max(10px, env(safe-area-inset-bottom)); }
.p-sheet__foot > * { max-width: 640px; margin: 0 auto; }
.p-sheet--small .p-sheet__foot .p-btn { display: flex; width: 100%; }
.p-foot-row { display: flex; gap: 8px; }
.p-foot-row .p-btn--primary { flex: 1; }

/* Formularios */
.p-form { display: grid; gap: 16px; }
.p-field { display: grid; gap: 6px; }
.p-field__label, .p-fieldset legend, .p-fieldset summary { font-weight: 650; font-size: 14.5px; }
.p-field__help { color: var(--p-muted); font-size: 13px; }
.p-form input[type=text], .p-form input[type=date], .p-form textarea, .p-form select, .p-mgroup input {
	width: 100%; padding: 11px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface); font-size: 16px;
}
.p-form textarea { resize: vertical; }
.p-fieldset { border: 1px solid var(--p-line); border-radius: var(--p-radius); background: var(--p-surface); padding: 12px; margin: 0; min-width: 0; }
.p-fieldset legend { padding: 0 4px; }
.p-fieldset summary { cursor: pointer; padding: 2px 0; }
details.p-fieldset[open] summary { margin-bottom: 10px; }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-switches { display: grid; gap: 4px; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 4px 12px; }

/* Foto */
.p-photo { display: flex; gap: 14px; align-items: center; }
.p-photo__frame { width: 104px; height: 104px; flex: 0 0 104px; border-radius: 14px; overflow: hidden; background: var(--p-surface); border: 1px dashed var(--p-line); display: grid; place-items: center; }
.p-photo__img { width: 100%; height: 100%; object-fit: cover; }
.p-photo__none { color: var(--p-muted); font-size: 13px; }
.p-photo__actions { display: grid; gap: 8px; justify-items: start; }

/* Precios */
.p-prices { display: grid; gap: 8px; }
.p-price-row { display: flex; gap: 8px; align-items: center; }
.p-price-row > input { flex: 1; min-width: 0; }
.p-price-eur { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.p-form input.p-price-input { width: 96px; flex: 0 0 96px; text-align: right; }

/* Extras */
.p-extras { display: grid; gap: 8px; margin-top: 6px; }
.p-extra { border: 1px solid var(--p-line); border-radius: 12px; padding: 8px; display: grid; gap: 6px; }
.p-extra__al summary { font-size: 13px; color: var(--p-muted); cursor: pointer; padding: 2px 0; }
.p-extra__al .p-al-grid { margin-top: 6px; }
.p-extras > .p-btn { justify-self: start; }
.p-form .p-extra input.p-price-input { width: 72px; flex-basis: 72px; }
.p-extra .p-price-row { gap: 6px; }

/* Chips y alérgenos */
.p-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.p-chip { border: 1px solid var(--p-line); background: var(--p-bg); padding: 8px 12px; border-radius: 999px; font-size: 14px; min-height: 38px; cursor: pointer; }
.p-chip[aria-pressed="true"] { background: var(--p-dark); color: #fff; border-color: var(--p-dark); }
.p-chipsets { display: grid; gap: 10px; }
.p-chipset__title { font-size: 12.5px; color: var(--p-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.p-al-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.p-al { display: flex; align-items: center; gap: 8px; text-align: left; border: 1px solid var(--p-line); background: var(--p-bg); border-radius: 10px; padding: 6px 8px; min-height: 46px; font-size: 14px; cursor: pointer; }
.p-al span:first-child { display: flex; }
.p-al[aria-pressed="true"] { border-color: var(--p-dark); background: #fff; font-weight: 650; box-shadow: inset 0 0 0 1px var(--p-dark); }
.p-al[aria-pressed="true"]::after { content: "✓"; margin-left: auto; }

/* Menús */
.p-intro { padding: 18px 2px 6px; }
.p-intro h2 { font-size: 22px; }
.p-intro p { color: var(--p-muted); font-size: 14.5px; margin-top: 4px; }
.p-menus { display: grid; gap: 10px; margin-top: 12px; }
.p-menu-card { width: 100%; text-align: left; display: grid; gap: 4px; border: 1px solid var(--p-line); background: var(--p-surface); border-radius: var(--p-radius); padding: 14px; cursor: pointer; }
.p-menu-card strong { font-size: 17px; }
.p-menu-card small { color: var(--p-muted); font-size: 13.5px; }
.p-badge { justify-self: start; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--p-bg); color: var(--p-muted); }
.p-badge--ok { background: #e3f3e7; color: var(--p-ok); }
.p-badge--info { background: #e6eefb; color: #2453a6; }
.p-seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 12px; padding: 4px; gap: 4px; }
.p-seg__btn { border: 0; background: none; border-radius: 9px; padding: 10px 6px; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--p-muted); }
.p-seg__btn[aria-checked="true"] { background: var(--p-dark); color: #fff; }
.p-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.p-day { aspect-ratio: 1; max-height: 48px; border-radius: 50%; border: 1px solid var(--p-line); background: var(--p-bg); font-weight: 700; cursor: pointer; }
.p-day[aria-pressed="true"] { background: var(--p-accent); border-color: var(--p-accent); color: var(--p-on-accent); }
.p-mgroups { display: grid; gap: 12px; }
.p-mgroup { border: 1px solid var(--p-line); border-radius: 12px; padding: 10px; background: var(--p-bg); display: grid; gap: 8px; }
.p-mgroup__name { font-weight: 700; }
.p-mitems { display: grid; gap: 8px; }
.p-mitem { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 10px; padding: 8px; display: grid; gap: 6px; }
.p-mitem__row { display: flex; gap: 6px; align-items: center; }
.p-mitem__row > input { flex: 1; min-width: 0; }
.p-mitem__al { flex: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-height: 40px; border: 1px dashed var(--p-line); background: var(--p-bg); border-radius: 8px; padding: 4px 8px; font-size: 13.5px; color: var(--p-muted); cursor: pointer; text-align: left; }
.p-mitem__al svg { display: block; }
.p-mgroup .p-mitem__extra { width: 84px; flex: 0 0 84px; }

/* Traducciones e idiomas */
.p-tr summary { color: var(--p-accent); }
.p-tr__body { display: grid; gap: 12px; }
.p-tr__lang { display: grid; gap: 10px; padding: 10px; border-radius: 10px; background: var(--p-bg); }
.p-tr__title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--p-muted); }
.p-tr__group { display: grid; gap: 6px; padding-left: 10px; border-left: 2px solid var(--p-line); }
.p-tr input, .p-tr textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface); font-size: 16px; }
.p-langs { display: grid; gap: 14px; }
.p-lang { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); padding: 14px; display: grid; gap: 10px; }
.p-lang__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.p-lang__head h3 { font-size: 18px; }
.p-lang__head a { color: var(--p-accent); font-weight: 600; font-size: 14px; }
.p-lang__stats { display: grid; gap: 4px; }
.p-lang__stats li { display: flex; justify-content: space-between; font-size: 14.5px; }
.p-lang__stats .is-missing { color: var(--p-bad); }
.p-lang__stats .is-done { color: var(--p-ok); }

/* Más */
.p-links { display: grid; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); margin-top: 12px; }
.p-links li + li { border-top: 1px solid var(--p-line); }
.p-links a { display: block; padding: 15px 14px; color: var(--p-text); text-decoration: none; font-weight: 600; }
.p-tip { margin-top: 16px; padding: 14px; border-radius: var(--p-radius); background: #fff7e8; border: 1px solid #f0dfbd; }
.p-tip h3 { font-size: 15px; }
.p-tip p { font-size: 14px; margin-top: 4px; color: #5c4a2a; }

/* Avisos */
.p-toast {
	position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 80;
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	background: var(--p-dark); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25);
	transition: opacity .2s, transform .2s;
}
.p-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.p-toast.is-bad { background: var(--p-bad); }
body.has-sheet .p-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }

@media (min-width: 700px) {
	.p-al-grid { grid-template-columns: repeat(3, 1fr); }
	.p-fab { right: calc(50% - 320px + 16px); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Ordenar platos arrastrando (0.3.2) */
.p-sortbtn {
	display: inline-flex; align-items: center; gap: 6px;
	margin-top: 10px; min-height: 40px; padding: 8px 14px;
	border: 1px solid var(--p-line); border-radius: 999px;
	background: var(--p-surface); font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.p-sortbar {
	position: sticky; top: 0; z-index: 10;
	display: flex; align-items: center; gap: 12px;
	margin: 0 -2px; padding: 12px 14px;
	background: var(--p-dark); color: #fff;
	border-radius: 0 0 var(--p-radius) var(--p-radius);
	font-size: 14px; line-height: 1.35;
	box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .5);
}
.p-sortbar p { flex: 1; }
.p-sortbar .p-btn { flex: 0 0 auto; min-width: 84px; }
.is-sorting .p-dish__main { cursor: default; }
.is-sorting .p-dish { padding-right: 4px; }
.is-sorting .p-grip { flex-basis: 52px; margin-right: -6px; color: var(--p-text); }
.is-sorting .p-fab { display: none; }
.p-grip {
	flex: 0 0 38px; align-self: stretch; min-height: 44px;
	display: grid; place-items: center;
	margin-right: -10px; padding: 0;
	border: 0; background: none;
	color: var(--p-muted); line-height: 0;
	cursor: grab; touch-action: none;
}
.p-grip:hover { color: var(--p-text); }
.p-dishes.is-sortable .p-dish { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.is-sorting .p-grip { order: 2; }
.p-dish.is-dragging {
	position: fixed; z-index: 60; margin: 0;
	background: var(--p-surface);
	border: 1px solid var(--p-line); border-radius: 12px;
	box-shadow: 0 16px 34px -10px rgba(0, 0, 0, .35);
	transform: scale(1.02); pointer-events: none;
}
.p-dish.is-dragging .p-grip { cursor: grabbing; color: var(--p-accent); }
.p-dish-ph { border-top: 1px solid var(--p-line); background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--p-accent) 7%, transparent) 8px 16px); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--p-accent) 35%, transparent); }
.p-dish-ph:first-child { border-top: 0; }
.p-dish-ph + .p-dish { border-top: 1px solid var(--p-line); }
body.p-dragging, body.p-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
@media (prefers-reduced-motion: reduce) { .p-dish.is-dragging { transform: none; } }

/* ---------- Reservas (0.4) ---------- */
.p-tab { position: relative; }
.p-tab__n { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--p-bad); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 19px; text-align: center; }
.p-badge--warn { background: #fff1d6; color: #8a5a00; }
.p-badge--mute { background: var(--p-bg); color: var(--p-muted); }
.p-tip--warn { border-color: #f0d9a8; background: #fffaf0; }
.p-tip--warn .p-btn { margin-top: 10px; }

.p-res-pending { margin: 14px 0 6px; padding: 12px; border-radius: var(--p-radius); background: #fff8ea; border: 1px solid #f0d9a8; }
.p-res-pending h3 { font-size: 15px; margin-bottom: 8px; color: #8a5a00; }

.p-res-nav { display: flex; align-items: center; gap: 2px; margin: 14px -6px 0; }
.p-res-days { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; scroll-snap-type: x proximity; }
.p-res-days::-webkit-scrollbar { display: none; }
.p-res-day { position: relative; flex: 0 0 56px; scroll-snap-align: start; display: grid; justify-items: center; gap: 1px; padding: 7px 0 8px; border-radius: 12px; border: 1px solid var(--p-line); background: var(--p-surface); cursor: pointer; line-height: 1.1; color: var(--p-text); }
.p-res-day__w { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--p-muted); }
.p-res-day__n { font-size: 20px; font-weight: 800; }
.p-res-day__c { font-size: 11px; color: var(--p-muted); font-variant-numeric: tabular-nums; }
.p-res-day__dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #e0a100; }
.p-res-day.is-closed { opacity: .5; }
.p-res-day[aria-checked="true"] { background: var(--p-dark); border-color: var(--p-dark); color: #fff; }
.p-res-day[aria-checked="true"] span:not(.p-res-day__n):not(.p-res-day__dot) { color: rgba(255,255,255,.72); }

.p-res-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 2px 8px; }
.p-res-head h2 { font-size: 21px; }
.p-res-head input { width: auto; max-width: 150px; padding: 8px 10px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface); font-size: 15px; }

.p-res-caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-bottom: 12px; }
.p-res-cap { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; padding: 10px 12px; border-radius: 12px; background: var(--p-surface); border: 1px solid var(--p-line); }
.p-res-cap__name { font-weight: 700; font-size: 14px; }
.p-res-cap strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.p-res-cap__unit { grid-column: 1 / -1; font-size: 12px; color: var(--p-muted); margin-top: -4px; text-align: right; }
.p-res-cap__bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--p-bg); overflow: hidden; }
.p-res-cap__bar span { display: block; height: 100%; background: var(--p-ok); border-radius: 3px; }
.p-res-cap.is-full .p-res-cap__bar span { background: var(--p-bad); }
.p-res-cap.is-full strong { color: var(--p-bad); }

.p-res-list { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.p-res-row { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); overflow: hidden; }
.p-res-row__main { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.p-res-row__time { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; display: grid; line-height: 1.1; min-width: 58px; }
.p-res-row__time small { font-size: 11.5px; font-weight: 700; color: var(--p-muted); text-transform: uppercase; }
.p-res-row__text { display: grid; gap: 2px; min-width: 0; }
.p-res-row__text strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-res-row__text small { color: var(--p-muted); font-size: 13px; }
.p-res-row__notes { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-res-row__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.p-res-row.is-pendiente { border-color: #f0d9a8; }
.p-res-row.is-sentada .p-res-row__time { color: var(--p-muted); }
.p-res-row.is-cancelada, .p-res-row.is-rechazada, .p-res-row.is-no_vino { opacity: .65; }
.p-res-gone { margin-top: 14px; }
.p-res-gone summary { cursor: pointer; color: var(--p-muted); font-size: 14px; padding: 6px 2px; }
.p-res-gone .p-res-list { margin-top: 6px; }

.p-res-info { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; padding: 14px; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: var(--p-radius); }
.p-res-info dt { color: var(--p-muted); font-size: 14px; }
.p-res-info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.p-res-info a { color: inherit; }
.p-res-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.p-res-h { font-size: 16px; margin-top: 8px; }
.p-res-turnos, .p-res-cierres { display: grid; gap: 10px; }
.p-res-cierre { display: grid; gap: 8px; padding: 10px 12px; background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 12px; }
.p-res-cierre__row { display: flex; gap: 6px; align-items: center; }
.p-form input[type=time], .p-form input[type=number], .p-form input[type=tel], .p-form input[type=email] {
	width: 100%; padding: 11px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface); font-size: 16px;
}
.p-res .p-fab { z-index: 25; }

.p-res-row__go { font-size: 24px; color: var(--p-muted); line-height: 1; }
.p-res-row__text .p-badge { margin-top: 2px; }
.p-res-more { width: 100%; }
a.p-btn:not(.p-btn--primary) { color: var(--p-text); }
.p-two > * { min-width: 0; }
.p-form input { min-width: 0; max-width: 100%; }
.p-tv-url { font-weight: 700; overflow-wrap: anywhere; margin: 8px 0 10px; }
.p-tv-url a { color: var(--p-accent); }
.p-tip .p-foot-row .p-btn { flex: 1; }
.p-form input[type=url] { width: 100%; padding: 11px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: var(--p-surface); font-size: 16px; }
