
/* —— Panel util —— */
:root {
  --ink: #1c2422;
  --muted: #5a6864;
  --paper: #f3f6f4;
  --card: #ffffff;
  --line: #cfd9d5;
  --brand: #2f5d56;
  --accent: #d4ebe4;
}
.btn-soft {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn-soft:hover { background: color-mix(in srgb, var(--accent) 40%, #fff); }
.tab-badge {
  display: inline-block;
  min-width: 1.15rem;
  padding: 0.05rem 0.35rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}
.panel-tabs button.on .tab-badge { background: var(--brand); color: #fff; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.card-actions button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.card-actions button.danger { color: #9b2c2c; border-color: #e2b4b4; }
.can-do {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.can-do span {
  background: color-mix(in srgb, var(--accent) 50%, #fff);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 650;
}
.wa-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; align-items: center; margin: 0 0 0.9rem; }
.wa-note { margin: 0; color: var(--muted); font-size: 0.92rem; max-width: 42rem; }
.wa-bubble {
  background: color-mix(in srgb, var(--accent) 55%, #fff);
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px;
  padding: 0.75rem 0.85rem;
  margin: 0.6rem 0 0.9rem;
  white-space: pre-wrap;
  line-height: 1.4;
  color: var(--ink);
}
.origen-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
}
.origen-pill.is-wa {
  background: color-mix(in srgb, var(--accent) 60%, #fff);
  border-color: var(--line);
  color: var(--brand);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.create .btn-soft { align-self: end; }
.sheet .actions button.danger {
  color: #9b2c2c;
  border-color: #e2b4b4;
}
.sheet .actions button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* Base compartida para ejemplos de sistemas (gestión). */
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.45;
}
a { color: inherit; }
.band {
  background: var(--brand);
  color: #f7f4ef;
  position: sticky;
  top: 0;
  z-index: 8;
}
.band-inner, .wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.band-inner {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.brand { text-decoration: none; }
.brand strong {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
}
.brand span { display: block; font-size: 0.75rem; opacity: 0.78; }
.band nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 0.92rem; }
.band nav a { text-decoration: none; opacity: 0.9; }
.btn, button { font: inherit; cursor: pointer; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--ink);
  text-decoration: none;
  border: 0;
  padding: 0.65rem 1.05rem;
  font-weight: 650;
  border-radius: 8px;
}
.btn-quiet {
  background: transparent;
  color: inherit;
  border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}
.band .btn { background: var(--accent); color: var(--ink); font-weight: 700; }
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding: 2.6rem 0 1.6rem;
  align-items: start;
}
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 550; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 3.5vw, 2.65rem); line-height: 1.12; margin: 0.35rem 0 0.75rem; }
h2 { font-size: 1.55rem; margin: 0.2rem 0 0.55rem; }
.kicker {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--brand);
  font-weight: 700;
  margin: 0;
}
.lead { font-size: 1.05rem; color: var(--muted); max-width: 38rem; margin: 0; }
.hero-actions { display: flex; gap: 0.65rem; flex-wrap: wrap; margin: 1.2rem 0 0.4rem; }
.hero-facts {
  list-style: none;
  padding: 0;
  margin: 1.2rem 0 0;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}
.hero-facts strong { display: block; color: var(--ink); font-size: 1.15rem; }
.panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--brand) 12%, transparent);
}
.panel-card h3 { margin: 0 0 0.55rem; font-size: 1.05rem; }
.panel-card ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.section { padding: 1.8rem 0; }
.section-lead { color: var(--muted); max-width: 40rem; margin: 0 0 1rem; }
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.feature {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
}
.feature strong { display: block; margin-bottom: 0.35rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.panel-body { background: var(--paper); }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.4rem 0 0.8rem;
}
.toolbar h1 { font-size: 1.65rem; margin: 0.2rem 0 0; }
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}
.stat span { display: block; color: var(--muted); font-size: 0.8rem; }
.stat strong { font-size: 1.25rem; font-family: "Fraunces", Georgia, serif; }
.create {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
}
.create label { display: grid; gap: 0.25rem; font-size: 0.78rem; color: var(--muted); font-weight: 600; }
.create input, .create select, .create textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.create .full { grid-column: 1 / -1; }
.create button {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  font-weight: 650;
}
.workspace {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 0.9rem;
  padding-bottom: 2rem;
}
.list, .sheet {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: color-mix(in srgb, var(--paper) 70%, #fff); }
tr[data-id] { cursor: pointer; }
tr.is-on td { background: color-mix(in srgb, var(--accent) 28%, #fff); }
.amount { text-align: right; font-variant-numeric: tabular-nums; }
.badge-state {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand);
}
.badge-state.is-warn { background: #f8e6c8; color: #7a4a10; }
.badge-state.is-ok { background: #d9eee3; color: #1b5c3d; }
.badge-state.is-bad { background: #f3d6d6; color: #7a2424; }
.sheet { padding: 1rem; min-height: 280px; }
.sheet h3 { margin: 0 0 0.5rem; }
.sheet p { margin: 0.35rem 0; color: var(--muted); }
.sheet .actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.9rem; }
.sheet .actions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
}
.filters-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.85rem; }
.filters-row button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}
.filters-row button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
footer.wrap {
  padding: 1.4rem 22px 2.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .hero, .workspace, .grid-3, .stats, .create { grid-template-columns: 1fr; }
  .create { grid-template-columns: 1fr 1fr; }
}


/* Fase C — pulido */
.band .btn-ghost-nav {
  background: transparent;
  color: #f7f4ef;
  border: 1px solid rgba(247, 244, 239, 0.35);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}
.toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.hint-bar {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 35%, #fff);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.hint-bar strong { color: var(--ink); }
.empty-sheet {
  color: var(--muted);
  padding: 1.2rem 0.2rem;
}
.cta-band {
  margin: 1.5rem 0 0.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: 14px;
  background: var(--brand);
  color: #f7f4ef;
}
.cta-band h2 { color: inherit; margin: 0.2rem 0 0.45rem; font-size: 1.35rem; }
.cta-band p { margin: 0 0 0.9rem; opacity: 0.88; max-width: 40rem; }
.cta-band .btn { background: #f7f4ef; color: var(--brand); }
.hero-visual {
  min-height: 280px;
  border-radius: 14px;
  background: var(--brand) center/cover no-repeat;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--brand) 25%, transparent);
}
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 55%, transparent), transparent 60%);
}
@media (max-width: 900px) {
  .hero-visual { min-height: 180px; }
}


/* —— UI enriquecida —— */
body {
  background:
    radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
    var(--paper);
}
.band {
  backdrop-filter: saturate(1.1);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 28%, transparent);
}
.band-inner { min-height: 74px; }
.hero {
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.6rem 2rem;
  padding: 2.8rem 0 1.8rem;
}
.hero-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 340px;
  box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 22%, transparent);
}
.hero-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 340px;
}
.hero-stage .cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.1rem 1.2rem;
  background: linear-gradient(transparent, rgba(10,9,8,.82));
  color: #f7f4ef;
}
.hero-stage .cap strong { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.15rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}
.gallery figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.gallery img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  padding: 0.45rem 0.6rem 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  counter-reset: step;
}
.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.05rem 1.1rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 1.7rem; height: 1.7rem;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.55rem;
}
.step strong { display: block; margin-bottom: 0.25rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.panel-body .wrap { padding-bottom: 1rem; }
.thumb-row {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0.55rem 0 0.2rem;
}
.thumb-row img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.sheet-hero {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  border: 1px solid var(--line);
}
.stat {
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 12%, transparent);
}
tr[data-id]:hover td { background: color-mix(in srgb, var(--accent) 18%, #fff); }
@media (max-width: 900px) {
  .gallery, .steps { grid-template-columns: 1fr 1fr; }
  .hero-stage, .hero-stage img { min-height: 220px; }
}
@media (max-width: 560px) {
  .create { grid-template-columns: 1fr !important; }
  .search-box input { min-width: 0; width: 100%; }
  .band-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
    min-height: 0;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }
  .toast { left: 12px; right: 12px; bottom: 12px; }
}


/* —— Panel completo —— */
.panel-tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.panel-tabs button {
  border: 1px solid rgba(247,244,239,.45);
  background: rgba(247,244,239,.12);
  color: #f7f4ef;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 650;
  font-size: 0.86rem;
}
.panel-tabs button.on {
  background: #f7f4ef;
  color: var(--brand);
  border-color: #f7f4ef;
}
.panel-hidden { display: none !important; }
.search-box input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.75rem;
  min-width: 220px;
  font: inherit;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
  z-index: 40;
  opacity: 0;
  transform: translateY(8px);
  transition: .2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 0.8rem 0 1.4rem;
}
.mini-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.mini-card:hover, .mini-card.is-on {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--brand) 16%, transparent);
}
.mini-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
}
.mini-card .body { padding: 0.75rem 0.85rem 0.95rem; }
.mini-card .body strong { display: block; margin-bottom: 0.2rem; }
.mini-card .body span { color: var(--muted); font-size: 0.88rem; }
.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.2rem;
}
.kanban-col {
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  min-height: 220px;
}
.kanban-col h3 {
  font-size: 0.95rem;
  margin: 0 0 0.55rem;
}
.kanban-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.kanban-card strong { display: block; }
.kanban-card span { color: var(--muted); font-size: 0.85rem; }
.mesas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.mesa-tile {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.9rem 0.8rem;
  text-align: center;
  cursor: pointer;
  min-height: 110px;
}
.mesa-tile strong { display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.mesa-tile.is-cocina { background: #fff4e5; border-color: #e8c48a; }
.mesa-tile.is-lista { background: #e8f6ee; border-color: #9dceb3; }
.mesa-tile.is-abierta { background: #eef4fb; border-color: #b7cbe4; }
.mesa-tile.is-on { outline: 2px solid var(--brand); }
.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 1rem;
}
.cal-day {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  padding: 0.45rem;
  min-height: 78px;
  font-size: 0.78rem;
}
.cal-day strong { display: block; margin-bottom: 0.25rem; }
.cal-pill {
  display: block;
  background: color-mix(in srgb, var(--brand) 14%, #fff);
  color: var(--brand);
  border-radius: 6px;
  padding: 0.15rem 0.3rem;
  margin-top: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 900px) {
  .kanban, .calendar-strip { grid-template-columns: 1fr; }
}
