:root {
  --ink: #241c14;
  --bar: #2a2118;
  --clay: #c4512c;
  --paper: #f4efe8;
  --card: #fffdf9;
  --line: #e2d5c6;
  --muted: #6d5d4e;
  --ok: #3d6b45;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12px 12px, rgba(196, 81, 44, 0.05) 1px, transparent 1px) 0 0 / 18px 18px,
    var(--paper);
  font-family: "Barlow", "Segoe UI", sans-serif;
}
a { color: inherit; }
.top {
  background: var(--bar);
  color: #f7efe6;
}
.top-inner, .wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.top-inner {
  min-height: 68px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.logo { text-decoration: none; font-weight: 700; letter-spacing: 0.12em; font-size: 15px; }
.logo small { display: block; letter-spacing: 0.04em; font-weight: 500; opacity: 0.7; font-size: 12px; }
.top nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.top nav a { text-decoration: none; }
.btn, button { font: inherit; cursor: pointer; }
.btn {
  display: inline-block;
  background: var(--clay);
  color: white;
  border: 0;
  text-decoration: none;
  padding: 12px 18px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(196, 81, 44, 0.3);
}
.btn:hover {
  background: #d45a35;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(196, 81, 44, 0.4);
}
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 28px; padding: 48px 0 20px; }
h1 { font-size: 48px; line-height: 0.98; margin: 8px 0; letter-spacing: -0.03em; }
.kicker { color: var(--clay); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.5; max-width: 36rem; }
.day {
  background: var(--card);
  border: 1px dashed #c9b5a0;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.day:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.day-img { height: 140px; overflow: hidden; }
.day-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.day:hover .day-img img { transform: scale(1.05); }
.day-body { padding: 16px; }
.day header { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.slip { border-top: 1px solid var(--line); padding: 10px 0; }
.slip strong { display: block; }
.modules, .flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.modules article, .flow article {
  background: var(--card);
  border-left: 4px solid var(--clay);
  padding: 20px;
  border-radius: 0 8px 8px 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.modules article:hover, .flow article:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.mod-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.mod-icon img { width: 100%; height: 100%; object-fit: cover; }
.modules h2, .flow h2 { margin: 0 0 10px; font-size: 20px; }
.modules p, .flow p, .note { color: var(--muted); line-height: 1.5; }
.section { padding: 18px 0; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
tbody tr { transition: background 0.2s ease; }
tbody tr:hover { background: #faf6f0; }
.tag { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.tag.pedido { color: #8a3b16; }
.tag.local { color: var(--ok); }
.tag.caja { color: var(--bar); }
footer { padding: 28px 0 40px; color: var(--muted); }

.board { padding: 20px 24px 40px; max-width: 1180px; margin: 0 auto; }
.head { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.head h1 { font-size: 36px; margin: 0; }
.stats { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.stats button, .stats div {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 8px 12px;
  min-width: 120px;
  text-align: left;
}
.stats strong { display: block; font-size: 22px; }
.stats .on { outline: 2px solid var(--clay); }
.layout { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 16px; }
.tickets { display: grid; gap: 10px; }
.ticket {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 6px solid var(--clay);
  padding: 12px;
}
.ticket.on { box-shadow: 0 0 0 2px var(--ink); }
.ticket header, .ticket-top { display: flex; justify-content: space-between; gap: 8px; }
.lines { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  background: #f6eee6;
  padding: 4px 8px;
  font-size: 13px;
}
.chip.warn { background: #fde7df; }
.sheet { background: var(--card); border: 1px solid var(--line); padding: 16px; }
label { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
input, select, textarea { width: 100%; font: inherit; padding: 8px; border: 1px solid var(--line); background: white; }
.item-row { display: grid; grid-template-columns: 1.4fr 70px 90px; gap: 6px; margin-top: 6px; }
.actions { display: flex; gap: 8px; margin-top: 12px; }
.ghost { background: transparent; border: 1px solid var(--line); padding: 8px 12px; }
.create { display: none; background: var(--card); border: 1px dashed #c9b5a0; padding: 12px; margin-bottom: 12px; }
.create.open { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 980px) {
  .hero, .modules, .flow, .layout, .create.open, .item-row { grid-template-columns: 1fr; }
  h1 { font-size: 36px; }
}

/* ARCA section */
.arca-section {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}
.arca-section h4 { margin: 0 0 8px; font-size: 13px; color: var(--terracota); display: flex; align-items: center; gap: 6px; }
.factura-box {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  font-size: 13px;
}
.factura-box h4 { margin: 0 0 8px; font-size: 13px; color: #166534; }
.factura-box .cae { font-family: monospace; color: #166534; }
.btn-panel { background: var(--terracota); color: white; border: 0; padding: 10px 16px; border-radius: 4px; cursor: pointer; font-weight: 500; }
.btn-panel:hover { opacity: 0.9; }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: white;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.app { min-height: 100vh; }
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 20px 24px 8px;
  max-width: 1180px;
  margin: 0 auto;
}
.toolbar h1 { font-size: 32px; margin: 4px 0; }
.search-input {
  width: min(280px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  font: inherit;
}
.panel-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.panel-tabs button {
  border: 1px solid rgba(247, 239, 230, 0.35);
  background: transparent;
  color: #f7efe6;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}
.panel-tabs button.on { background: #f7efe6; color: var(--bar); border-color: #f7efe6; }
.stats { max-width: 1180px; margin: 0 auto; padding: 0 24px 12px; }
.layout { max-width: 1180px; margin: 0 auto; padding: 0 24px 40px; }
.create { margin: 0 auto 12px; max-width: 1180px; width: calc(100% - 48px); }
.empty { color: var(--muted); }
.tag.faltante { color: var(--clay); }
@media (max-width: 980px) {
  .toolbar { flex-direction: column; align-items: start; }
  .search-input { width: 100%; }
}
