/* ==========================================================================
   menuual · Tema sobre Biings Design System (bds.css, basado en Bulma 0.9)
   Paleta: Lipstick Red · Blackberry Cream · Aquamarine · Tea Green · Banana Cream
   ========================================================================== */

:root {
  --mu-red: #EC0B43;
  --mu-red-dark: #C70638;
  --mu-red-soft: #FDE6EC;
  --mu-berry: #58355E;
  --mu-berry-dark: #3D2342;
  --mu-berry-soft: #F1ECF2;
  --mu-aqua: #7AE7C7;
  --mu-aqua-ink: #16765A;      /* aquamarine oscurecido para texto sobre blanco */
  --mu-aqua-soft: #E3FAF3;
  --mu-tea: #D6FFB7;
  --mu-tea-soft: #F1FFE6;
  --mu-banana: #FFF689;
  --mu-banana-soft: #FFFBD1;

  --mu-bg: #FAF7F5;
  --mu-surface: #FFFFFF;
  --mu-text: #2F1C33;
  --mu-muted: #6E5E72;
  --mu-border: rgba(88, 53, 94, .12);
  --mu-shadow: 0 1px 2px rgba(61, 35, 66, .06), 0 8px 24px rgba(61, 35, 66, .06);

  --mu-radius: 14px;
  --mu-radius-sm: 9px;
  --mu-header-h: 64px;
  --mu-tabbar-h: 68px;
}

/* ---------- Base ---------- */
html, body { background: var(--mu-bg); }
body {
  color: var(--mu-text);
  font-family: Averta, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mu-red); }
a:hover { color: var(--mu-red-dark); }
.title, .subtitle { color: var(--mu-berry-dark); }
.title { margin-top: 0 !important; line-height: 1.1; }
.has-text-muted { color: var(--mu-muted) !important; }
.has-text-berry { color: var(--mu-berry) !important; }
.has-text-red { color: var(--mu-red) !important; }
.has-text-aqua { color: var(--mu-aqua-ink) !important; }
.is-serif { font-family: Plush, Georgia, serif; }
.eyebrow {
  font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mu-muted);
}
svg.icon { fill: currentColor; flex-shrink: 0; }
svg.icon.is-lg { width: 1.5em; height: 1.5em; }
.is-hidden-empty:empty { display: none; }
:focus-visible { outline: 3px solid rgba(236, 11, 67, .35); outline-offset: 2px; }

/* ---------- Botones (sobre .button de BDS) ---------- */
.button { border-radius: 10px; font-weight: 500; gap: .45em; }
.button.is-primary { background: var(--mu-red); color: #fff; }
.button.is-primary:hover, .button.is-primary:focus { background: var(--mu-red-dark); color: #fff; }
.button.is-primary.is-light { background: var(--mu-red-soft); color: var(--mu-red-dark); }
.button.is-berry { background: var(--mu-berry); color: #fff; border-color: transparent; }
.button.is-berry:hover { background: var(--mu-berry-dark); color: #fff; }
.button.is-aqua { background: var(--mu-aqua); color: var(--mu-berry-dark); border-color: transparent; }
.button.is-aqua:hover { background: #62dcb8; }
.button.is-secondary { background: var(--mu-berry-soft); color: var(--mu-berry-dark); border-color: transparent; }
.button.is-secondary:hover { background: #e6dde8; }
.button.is-text { color: var(--mu-red); }
.button.is-text:hover { background: var(--mu-red-soft); color: var(--mu-red-dark); }
.button.is-ghost { color: var(--mu-berry); }
.button.is-claude {
  background: linear-gradient(135deg, var(--mu-berry) 0%, #7B4A82 100%);
  color: #fff; border-color: transparent;
}
.button.is-claude:hover { filter: brightness(1.08); color: #fff; }

/* ---------- Tags ---------- */
.tag:not(body) { border-radius: 999px; font-weight: 500; font-size: .78rem; gap: .35em; }
.tag.is-red { background: var(--mu-red-soft); color: var(--mu-red-dark); }
.tag.is-berry { background: var(--mu-berry-soft); color: var(--mu-berry); }
.tag.is-aqua { background: var(--mu-aqua-soft); color: var(--mu-aqua-ink); }
.tag.is-tea { background: var(--mu-tea); color: #35551C; }
.tag.is-banana { background: var(--mu-banana); color: #6A5D00; }
.tag.is-solid-berry { background: var(--mu-berry); color: #fff; }
.tag.is-outline { background: transparent; box-shadow: inset 0 0 0 1px var(--mu-border); color: var(--mu-muted); }

/* ---------- Formularios ---------- */
.input, .textarea, .select select {
  border-radius: 10px; border-color: #E2DAE3; color: var(--mu-text); box-shadow: none;
}
.input:focus, .textarea:focus, .select select:focus { border-color: var(--mu-red) !important; box-shadow: 0 0 0 3px rgba(236,11,67,.12) !important; }
.label { color: var(--mu-berry-dark); font-weight: 600; font-size: .9rem; }
.help { color: var(--mu-muted); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--mu-red); }
input[type="range"] { accent-color: var(--mu-red); width: 100%; }

/* ---------- Superficies ---------- */
.card-mu {
  background: var(--mu-surface); border-radius: var(--mu-radius);
  box-shadow: var(--mu-shadow); border: 1px solid var(--mu-border);
  padding: 1.25rem;
}
.card-mu + .card-mu { margin-top: 1rem; }
.card-mu.is-flat { box-shadow: none; }
.card-mu.is-tight { padding: .9rem 1rem; }
.card-mu.is-clickable { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.card-mu.is-clickable:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(61,35,66,.06), 0 14px 30px rgba(61,35,66,.1); }
.panel-tea { background: var(--mu-tea-soft); border: 1px solid #C9F2A6; border-radius: var(--mu-radius); padding: 1rem 1.1rem; }
.panel-banana { background: var(--mu-banana-soft); border: 1px solid #F2E77A; border-radius: var(--mu-radius); padding: 1rem 1.1rem; }
.panel-aqua { background: var(--mu-aqua-soft); border: 1px solid #B3F0DE; border-radius: var(--mu-radius); padding: 1rem 1.1rem; }
.panel-berry { background: var(--mu-berry); color: #fff; border-radius: var(--mu-radius); padding: 1.25rem; }
.panel-berry .title, .panel-berry .subtitle { color: #fff; }
.divider { height: 1px; background: var(--mu-border); margin: 1rem 0; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--mu-berry-dark); font-weight: 700; }
.brand:hover { color: var(--mu-berry-dark); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--mu-red);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.brand-mark::before { content: ""; position: absolute; inset: auto -6px -10px auto; width: 22px; height: 22px; border-radius: 50%; background: var(--mu-banana); }
.brand-mark::after { content: ""; position: absolute; inset: -8px auto auto -8px; width: 20px; height: 20px; border-radius: 50%; background: var(--mu-aqua); }
.brand-mark span { position: relative; z-index: 1; color: #fff; font-family: Plush, Georgia, serif; font-size: 1.15rem; line-height: 1; }
.brand-name { font-family: Plush, Georgia, serif; font-size: 1.45rem; letter-spacing: -.01em; }
.brand-name b { color: var(--mu-red); font-weight: inherit; }

/* ---------- Header / navegación (vista usuario) ---------- */
.mu-header {
  position: sticky; top: 0; z-index: 30; height: var(--mu-header-h);
  background: rgba(250, 247, 245, .9); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--mu-border);
}
.mu-header .inner { max-width: 1180px; margin: 0 auto; height: 100%; padding: 0 16px; display: flex; align-items: center; gap: 1rem; }
.mu-nav { display: flex; gap: .25rem; margin-left: 1.5rem; }
.mu-nav a {
  display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border-radius: 10px;
  color: var(--mu-muted); font-weight: 500;
}
.mu-nav a:hover { background: var(--mu-berry-soft); color: var(--mu-berry-dark); }
.mu-nav a.is-active { background: var(--mu-berry); color: #fff; }
.mu-header .spacer { flex: 1; }

.mu-main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 16px 3rem; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: var(--mu-tabbar-h);
  background: #fff; border-top: 1px solid var(--mu-border);
  display: none; padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: .7rem; font-weight: 600; color: var(--mu-muted);
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.is-active { color: var(--mu-red); }

/* Selector de comensal */
.eater-switch { display: inline-flex; background: var(--mu-berry-soft); border-radius: 999px; padding: 3px; }
.eater-switch button {
  border: 0; background: transparent; border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .85rem;
  color: var(--mu-berry); cursor: pointer; font-weight: 500; white-space: nowrap;
}
.eater-switch button.is-active { background: #fff; color: var(--mu-berry-dark); box-shadow: 0 1px 3px rgba(61,35,66,.15); }

.avatar-mu {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}
.avatar-mu.is-ji { background: var(--mu-berry); color: #fff; }
.avatar-mu.is-p2 { background: var(--mu-aqua); color: var(--mu-berry-dark); }
.avatar-mu.is-sm { width: 26px; height: 26px; font-size: .68rem; }

/* ---------- Encabezados de página ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.page-head .title { font-size: 2.1rem; margin-bottom: .25rem !important; }
.page-head p { color: var(--mu-muted); }
.back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--mu-muted); font-weight: 500; margin-bottom: .75rem; }
.back-link:hover { color: var(--mu-berry-dark); }

/* ---------- Comidas del día ---------- */
.meal {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 1rem; align-items: start;
  padding: 1rem 0; border-top: 1px solid var(--mu-border);
}
.meal:first-child { border-top: 0; padding-top: 0; }
.meal-time .t { font-weight: 700; color: var(--mu-berry-dark); }
.meal-time .h { font-size: .8rem; color: var(--mu-muted); }
.meal-name { font-weight: 600; font-size: 1.05rem; color: var(--mu-text); }
.meal-name a { color: inherit; }
.meal-name a:hover { color: var(--mu-red); }
.meal-groups { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.serve { margin-top: .7rem; }
.serve-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 0 .75rem; font-size: .9rem; background: #FCFAFB; border: 1px solid var(--mu-border); border-radius: 10px; padding: .35rem .75rem; }
.serve-grid.cols-1 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.serve-grid > span { padding: .4rem 0; border-top: 1px solid var(--mu-border); }
.serve-grid > .h { border-top: 0; font-size: .75rem; color: var(--mu-muted); font-weight: 600; display: flex; align-items: center; }
.serve-grid .it { color: var(--mu-muted); }
.serve-grid .v { font-weight: 600; color: var(--mu-berry-dark); }
.title.is-5, .title.is-6 { font-family: Averta, "Helvetica Neue", Arial, sans-serif; font-weight: 700; letter-spacing: -.005em; }
.title.is-5 { font-size: 1.15rem; }
.title.is-6 { font-size: 1rem; }
.serve-row { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; }
.serve-row .who { flex-shrink: 0; }
.serve-row .what { color: var(--mu-text); }
.serve-row .what small { color: var(--mu-muted); }
.meal-check {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid #D9CFDB; background: #fff; cursor: pointer;
  display: grid; place-items: center; color: transparent; transition: all .15s;
}
.meal-check.is-done { background: var(--mu-aqua); border-color: var(--mu-aqua); color: var(--mu-berry-dark); }
.meal.is-done .meal-name { text-decoration: line-through; color: var(--mu-muted); }

/* Hero del día */
.day-hero {
  border-radius: 20px; padding: 1.5rem; color: #fff; position: relative; overflow: hidden;
  background: var(--mu-berry);
}
.day-hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: var(--mu-red); opacity: .9;
}
.day-hero::before {
  content: ""; position: absolute; right: 90px; bottom: -70px; width: 140px; height: 140px; border-radius: 50%;
  background: var(--mu-aqua); opacity: .85;
}
.day-hero > * { position: relative; z-index: 1; }
.day-hero .title { color: #fff; font-size: 2rem; }
.day-hero .kpis { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 1rem; }
.day-hero .kpi b { display: block; font-size: 1.35rem; }
.day-hero .kpi span { font-size: .8rem; opacity: .85; }

/* Barras de progreso por grupo */
.group-bars { display: grid; gap: .7rem; }
.gbar .top { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .25rem; }
.gbar .track { height: 8px; border-radius: 999px; background: var(--mu-berry-soft); overflow: hidden; }
.gbar .fill { height: 100%; border-radius: 999px; background: var(--mu-red); }
.gbar .fill.is-aqua { background: var(--mu-aqua); }
.gbar .fill.is-tea { background: #9FDD6E; }
.gbar .fill.is-banana { background: #E9D93A; }
.gbar .fill.is-berry { background: var(--mu-berry); }

/* Agua */
.water { display: flex; gap: .35rem; flex-wrap: wrap; }
.water button {
  width: 30px; height: 38px; border-radius: 6px 6px 10px 10px; border: 2px solid #9ED9F0; background: #fff; cursor: pointer; padding: 0;
}
.water button.is-full { background: linear-gradient(to top, #7FD0EE 0%, #B7E8F7 100%); border-color: #7FD0EE; }

/* ---------- Calendario mensual ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--mu-muted); padding: 0 .35rem; }
.cal-day {
  background: #fff; border: 1px solid var(--mu-border); border-radius: 12px; min-height: 128px; padding: .55rem .6rem;
  display: flex; flex-direction: column; gap: .3rem; cursor: pointer; transition: border-color .15s, box-shadow .15s;
  text-align: left; font: inherit; color: inherit;
}
.cal-day:hover { border-color: var(--mu-red); box-shadow: 0 4px 16px rgba(236,11,67,.1); }
.cal-day.is-out { background: transparent; border-style: dashed; cursor: default; opacity: .45; }
.cal-day.is-out:hover { border-color: var(--mu-border); box-shadow: none; }
.cal-day.is-today { border: 2px solid var(--mu-red); }
.cal-day .n { font-weight: 700; font-size: .9rem; display: flex; justify-content: space-between; align-items: center; }
.cal-day .lunch { font-size: .8rem; line-height: 1.3; color: var(--mu-text); font-weight: 500; }
.cal-day .dots { display: flex; gap: 3px; margin-top: auto; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.leg { background: var(--mu-red); }
.dot.egg { background: #E9D93A; }
.dot.soy { background: var(--mu-berry); }
.dot.tofu { background: var(--mu-aqua); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: var(--mu-muted); }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }

.week-list { display: none; }

/* ---------- Receta ---------- */
.recipe-hero {
  border-radius: 20px; min-height: 220px; padding: 1.5rem; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; color: var(--mu-berry-dark);
}
.recipe-hero .title { font-size: 2.2rem; }
.recipe-hero .art { position: absolute; inset: 0; z-index: 0; }
.recipe-hero > *:not(.art) { position: relative; z-index: 1; }
.facts { display: flex; gap: .5rem; flex-wrap: wrap; }
.fact { background: rgba(255,255,255,.85); border-radius: 999px; padding: .3rem .75rem; font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.ing-list { list-style: none; margin: 0; padding: 0; }
.ing-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--mu-border); }
.ing-list li:last-child { border-bottom: 0; }
.ing-list .q { font-weight: 600; color: var(--mu-berry); white-space: nowrap; }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.1rem 3rem; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--mu-red-soft); color: var(--mu-red-dark); font-weight: 700; display: grid; place-items: center;
}
.steps li .timer { margin-top: .35rem; }
.serve-table { width: 100%; }
.serve-table th { font-size: .8rem; color: var(--mu-muted); font-weight: 600; text-align: left; padding: .4rem .5rem; }
.serve-table td { padding: .6rem .5rem; border-top: 1px solid var(--mu-border); vertical-align: top; }
.serve-table td.num { font-weight: 600; color: var(--mu-berry-dark); }

/* ---------- Lista de compras ---------- */
.shop-cat { margin-bottom: 1.25rem; }
.shop-cat h3 { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--mu-berry-dark); margin-bottom: .4rem; }
.shop-item {
  display: flex; align-items: center; gap: .75rem; padding: .6rem .25rem; border-bottom: 1px solid var(--mu-border); cursor: pointer;
}
.shop-item input { width: 20px; height: 20px; flex-shrink: 0; }
.shop-item .nm { flex: 1; }
.shop-item .qt { font-weight: 600; color: var(--mu-berry); white-space: nowrap; }
.shop-item.is-checked .nm, .shop-item.is-checked .qt { text-decoration: line-through; color: var(--mu-muted); }
.chip-row { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--mu-border); background: #fff; border-radius: 999px; padding: .45rem .9rem; font: inherit; font-size: .88rem;
  white-space: nowrap; cursor: pointer; color: var(--mu-berry-dark); font-weight: 500;
}
.chip.is-active { background: var(--mu-berry); color: #fff; border-color: var(--mu-berry); }
.progress-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--mu-red) calc(var(--p) * 1%), var(--mu-berry-soft) 0); }
.progress-ring span { width: 50px; height: 50px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* ---------- Claude / IA ---------- */
.ai-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; color: var(--mu-berry); background: var(--mu-berry-soft); padding: .2rem .6rem; border-radius: 999px; }
.ai-panel { border-radius: var(--mu-radius); background: linear-gradient(160deg, #fff 0%, var(--mu-berry-soft) 100%); border: 1px solid #E0D5E2; padding: 1.1rem; }
.ai-log { font-family: "Roboto Mono", ui-monospace, Menlo, monospace; font-size: .8rem; background: var(--mu-berry-dark); color: #F4EAF6; border-radius: 12px; padding: 1rem; max-height: 280px; overflow: auto; }
.ai-log .ok { color: var(--mu-aqua); }
.ai-log .warn { color: var(--mu-banana); }
.ai-log .dim { opacity: .6; }
.typing::after { content: "▍"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Modal ---------- */
.mu-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
.mu-modal.is-open { display: flex; }
.mu-modal .bg { position: absolute; inset: 0; background: rgba(46, 26, 51, .5); }
.mu-modal .dialog { position: relative; background: #fff; border-radius: 18px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; padding: 1.5rem; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.mu-modal .close { position: absolute; right: 12px; top: 12px; }

/* Toast */
.toast-mu {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 200;
  background: var(--mu-berry-dark); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-size: .9rem;
  display: flex; align-items: center; gap: .5rem; transition: all .25s ease; pointer-events: none; max-width: calc(100% - 32px);
}
.toast-mu.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Admin ---------- */
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--mu-berry-dark); color: #E9DDEB; padding: 1.25rem .9rem; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 1.25rem; overflow-y: auto;
}
.admin-side .brand, .admin-side .brand-name { color: #fff; }
.admin-side .brand-name b { color: var(--mu-aqua); }
.side-label { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .55; padding: 0 .6rem; margin-bottom: .35rem; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border-radius: 10px; color: #E9DDEB; font-weight: 500; font-size: .93rem; }
.side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side-nav a.is-active { background: var(--mu-red); color: #fff; }
.side-nav a .tag { margin-left: auto; }
.admin-top { display: none; }
.admin-main { padding: 1.75rem 2rem 3rem; min-width: 0; }
.stat { background: #fff; border: 1px solid var(--mu-border); border-radius: var(--mu-radius); padding: 1.1rem 1.2rem; height: 100%; }
.stat .v { font-size: 1.9rem; font-weight: 700; color: var(--mu-berry-dark); line-height: 1.1; }
.stat .l { font-size: .85rem; color: var(--mu-muted); }
.stat .d { font-size: .8rem; margin-top: .35rem; }
.table-mu { width: 100%; border-collapse: collapse; background: #fff; }
.table-mu th { text-align: left; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mu-muted); padding: .7rem .8rem; border-bottom: 1px solid var(--mu-border); white-space: nowrap; }
.table-mu td { padding: .8rem; border-bottom: 1px solid var(--mu-border); vertical-align: middle; }
.table-mu tr:last-child td { border-bottom: 0; }
.table-mu tr.is-clickable { cursor: pointer; }
.table-mu tr.is-clickable:hover td { background: #FCFAFB; }
.table-wrap { overflow-x: auto; border-radius: var(--mu-radius); border: 1px solid var(--mu-border); background: #fff; }

/* Stepper del asistente */
.stepper { display: flex; gap: .5rem; margin-bottom: 1.5rem; overflow-x: auto; scrollbar-width: none; }
.stepper .st { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem .5rem .5rem; border-radius: 999px; background: #fff; border: 1px solid var(--mu-border); white-space: nowrap; font-size: .88rem; color: var(--mu-muted); font-weight: 500; }
.stepper .st i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--mu-berry-soft); color: var(--mu-berry); font-weight: 700; font-size: .78rem; }
.stepper .st.is-active { border-color: var(--mu-red); color: var(--mu-berry-dark); }
.stepper .st.is-active i { background: var(--mu-red); color: #fff; }
.stepper .st.is-done i { background: var(--mu-aqua); color: var(--mu-berry-dark); }

.option-card { display: block; border: 2px solid var(--mu-border); border-radius: var(--mu-radius); padding: 1rem; cursor: pointer; background: #fff; height: 100%; transition: border-color .15s; }
.option-card:hover { border-color: #D8C6DB; }
.option-card.is-selected { border-color: var(--mu-red); background: #FFF8FA; }
.option-card input { margin-right: .4rem; }

.check-line { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid var(--mu-border); font-size: .92rem; }
.check-line:last-child { border-bottom: 0; }
.check-line .ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.check-line .ico.ok { background: var(--mu-aqua-soft); color: var(--mu-aqua-ink); }
.check-line .ico.warn { background: var(--mu-banana); color: #6A5D00; }
.check-line .ico.err { background: var(--mu-red-soft); color: var(--mu-red-dark); }

.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mini-cal div { aspect-ratio: 1; border-radius: 6px; background: var(--mu-berry-soft); font-size: .7rem; display: grid; place-items: center; color: var(--mu-berry); font-weight: 600; }
.mini-cal div.leg { background: var(--mu-red); color: #fff; }
.mini-cal div.warn { background: var(--mu-banana); color: #6A5D00; }
.mini-cal div.empty { background: transparent; }

.upload-zone { border: 2px dashed #D8C6DB; border-radius: var(--mu-radius); padding: 2rem 1rem; text-align: center; background: #fff; }
.code-block { font-family: "Roboto Mono", ui-monospace, Menlo, monospace; font-size: .8rem; background: #FBF8FB; border: 1px solid var(--mu-border); border-radius: 10px; padding: .9rem; white-space: pre-wrap; color: var(--mu-berry-dark); }

/* ---------- Landing / login ---------- */
.landing { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.landing-art { background: var(--mu-berry); position: relative; overflow: hidden; padding: 3rem; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.landing-art .blob { position: absolute; border-radius: 50%; }
.landing-art .title { color: #fff; font-size: 3.2rem; max-width: 12ch; }
.landing-form { display: flex; align-items: center; justify-content: center; padding: 2rem 16px; }
.landing-form .inner { width: 100%; max-width: 400px; }
.role-card { display: flex; gap: .9rem; align-items: center; padding: 1rem; border-radius: var(--mu-radius); border: 2px solid var(--mu-border); background: #fff; color: var(--mu-text); transition: border-color .15s, transform .15s; }
.role-card:hover { border-color: var(--mu-red); color: var(--mu-text); transform: translateY(-1px); }
.role-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.role-card + .role-card { margin-top: .75rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .mu-nav { display: none; }
  .tabbar { display: flex; }
  .mu-main { padding-bottom: calc(var(--mu-tabbar-h) + 2rem); }
  .toast-mu { bottom: calc(var(--mu-tabbar-h) + 16px); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  .admin-side.is-open { transform: none; box-shadow: 0 0 0 100vmax rgba(46,26,51,.45); }
  .admin-top { display: flex; align-items: center; gap: .75rem; height: 60px; padding: 0 16px; background: #fff; border-bottom: 1px solid var(--mu-border); position: sticky; top: 0; z-index: 30; }
  .admin-main { padding: 1.25rem 16px 3rem; }
  .landing { grid-template-columns: 1fr; }
  .landing-art { padding: 2rem 16px; min-height: 280px; }
  .landing-art .title { font-size: 2.2rem; }
}
@media (max-width: 768px) {
  .page-head .title { font-size: 1.7rem; }
  .cal-wrap { display: none; }
  .week-list { display: block; }
  .meal { grid-template-columns: 1fr auto; }
  .meal-time { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: baseline; }
  .day-hero .title { font-size: 1.6rem; }
  .day-hero { padding: 1.25rem; }
  .day-hero .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
  .day-hero .kpi b { font-size: 1.05rem; }
  .day-hero .kpi span { font-size: .72rem; line-height: 1.2; display: block; }
  .day-hero::before { right: -40px; bottom: -90px; opacity: .6; }
  .day-hero::after { right: -110px; top: -110px; }
  .mu-header .inner { gap: .5rem; }
  .brand-name { font-size: 1.25rem; }
  .recipe-hero .title { font-size: 1.7rem; }
  .eater-switch button { padding: .3rem .6rem; font-size: .8rem; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) { .show-mobile { display: none !important; } }

/* Íconos dentro de botones/tags: anula márgenes negativos de Bulma */
.button .icon:first-child:not(:last-child), .button .icon:last-child:not(:first-child),
.tag:not(body) .icon:first-child:not(:last-child) { margin: 0; }

/* Etiquetas sobre el campo (BDS usa etiqueta flotante dentro del input) */
.field > .label { position: static; padding: 0; width: auto; white-space: normal; pointer-events: auto; margin-bottom: .35rem; }
.table-mu code, .table-mu .nowrap { white-space: nowrap; }
.landing-art .brand, .landing-art .brand-name { color: #fff; }
.landing-art .brand-name b { color: var(--mu-aqua); }
.button > svg.icon, .tag:not(body) > svg.icon { margin: 0 !important; }
.burger-mu { display: grid; gap: 4px; width: 20px; }
.burger-mu i { display: block; height: 2px; border-radius: 2px; background: var(--mu-berry-dark); }
.button.is-primary[disabled], fieldset[disabled] .button.is-primary { background: var(--mu-red); border-color: transparent; opacity: .4; }
.button svg.icon, .tag svg.icon { color: inherit; fill: currentColor; }
.mini-cal { max-width: 380px; }
.mini-cal div.dow { aspect-ratio: auto; background: transparent; color: var(--mu-muted); font-size: .68rem; padding-bottom: 2px; }

/* Checkbox BDS (input + .checkbox-mark) con color de marca */
label.checkbox { position: relative; padding-left: 1.9rem !important; align-items: flex-start; line-height: 1.4; }
label.checkbox > input { position: absolute; left: 0; top: .35rem; width: 1.25rem; height: 1.25rem; margin: 0; }
label.checkbox > .checkbox-mark { top: .35rem; }
label.checkbox > input:checked ~ .checkbox-mark { background-color: var(--mu-red-ink); box-shadow: none; }
.field > .label { opacity: 1; }
.field > .input { height: 2.5em; padding: calc(.5em - 1px) calc(.75em - 1px); }

/* Tonos de contraste AA (ver documentacion/06-design-system.md) */
:root { --mu-red-ink: #D60A3C; --mu-aqua-ink: #0F6B52; }
a, .button.is-text, .has-text-red { color: var(--mu-red-ink); }
.button.is-primary { background: var(--mu-red-ink); }
.button.is-primary:hover, .button.is-primary:focus { background: #B8072F; }
.side-nav a.is-active { background: var(--mu-red-ink); }
label.checkbox > input:checked ~ .checkbox-mark { background-color: var(--mu-red-ink) !important; }
.field .input { height: 2.5em !important; padding-top: calc(.5em - 1px) !important; padding-bottom: calc(.5em - 1px) !important; }
.field .textarea { padding-top: .6em !important; }
.field input[type="range"] { box-shadow: none; background: transparent; border: 0; padding: 0; height: auto; }
.field .input, .field .textarea { min-height: 0 !important; }
.field .textarea { min-height: 5em !important; }
.table-mu code, .tag code { padding: .2em .55em; border-radius: 6px; }
