/* ================================================================
   CAFETECA — STYLE.CSS — Redesign v2
   Fuentes: Playfair Display (display) + Figtree (cuerpo/números)
   ================================================================ */

:root {
  /* Fondos */
  --bg:      #070504;
  --surface: #0f0c0a;
  --surface2:#181310;
  --surface3:#201a14;
  /* Bordes */
  --border:  #2a1d0d;
  --border2: #382615;
  /* Acento — terracota espresso */
  --accent:  #bf5b26;
  --accent2: #dba055;
  --accent-dim:  rgba(191,91,38,0.13);
  --accent-glow: rgba(191,91,38,0.32);
  /* Texto */
  --text:  #f2ebe0;
  --text2: #a89585;
  --text3: #614f3f;
  /* Estados */
  --green:        #5da86e;
  --green-dim:    rgba(93,168,110,0.1);
  --green-border: rgba(93,168,110,0.28);
  --red:          #bf6060;
  --amber:        #d2a030;
  --amber-dim:    rgba(210,160,48,0.1);
  --amber-border: rgba(210,160,48,0.28);
  /* Radios */
  --r:    14px;
  --r-sm:  8px;
  --r-lg: 18px;
  --r-xl: 22px;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Figtree', 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── Iconos SVG ── */
.ic {
  display: inline-block;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
  pointer-events: none;
}
.ic-sm { width: 14px; height: 14px; }
.ic-md { width: 17px; height: 17px; }
.ic-lg { width: 22px; height: 22px; }
.ic-xl { width: 28px; height: 28px; }

/* ── Navegación top ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  background: rgba(7,5,4,0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 21px;
  color: var(--accent2);
  line-height: 1;
  letter-spacing: 0.3px;
}
.nav-logo-tag {
  font-size: 9.5px;
  color: var(--text3);
  font-style: italic;
  letter-spacing: 0.2px;
  margin-top: 1px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}
.nav-search {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 20px;
  padding: 7px 13px 7px 34px;
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
  width: 100%;
  max-width: 190px;
  transition: border-color 0.2s, max-width 0.25s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d5047' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.nav-search:focus { border-color: var(--accent); max-width: 230px; }
.nav-search::placeholder { color: var(--text3); }

.btn-icon-nav {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.btn-icon-nav:hover, .btn-icon-nav:active {
  border-color: var(--accent);
  color: var(--accent2);
}

.nav-add {
  background: var(--accent);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 16px var(--accent-glow);
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-add:active { transform: scale(0.92); box-shadow: 0 1px 8px var(--accent-glow); }

/* ── Navegación inferior ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: rgba(12,9,7,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
  flex: 1;
  background: none;
  border: none;
  color: var(--text3);
  padding: 10px 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  transition: color 0.15s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item.active { color: var(--accent2); }
.bnav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28%;
  right: 28%;
  height: 2px;
  background: var(--accent2);
  border-radius: 0 0 2px 2px;
}
.bnav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bnav-icon .ic { width: 22px; height: 22px; }
.bnav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ── Páginas ── */
.page {
  display: none;
  padding: 14px;
  padding-bottom: calc(80px + env(safe-area-inset-bottom));
}
.page.active { display: block; }

/* ── Barra de filtros ── */
.filter-bar { margin-bottom: 12px; }
.filter-status {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
  margin-bottom: 6px;
}
.filter-status::-webkit-scrollbar { display: none; }
.fb {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 5px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  transition: all 0.15s;
  flex-shrink: 0;
  letter-spacing: 0.2px;
}
.fb.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.filter-sort {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
  cursor: pointer;
}
.filter-sort:focus { border-color: var(--accent); }
.filter-toggle-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  letter-spacing: 0.2px;
}
.filter-toggle-btn.active {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent2);
}
.ftb-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  display: none;
  font-family: 'Figtree', sans-serif;
}
.ftb-badge.show { display: inline; }

/* ── Panel de filtros avanzados ── */
.filter-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
  margin-bottom: 10px;
}
.filter-panel.open { display: block; }
.filter-groups { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.filter-group label {
  display: block;
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 5px;
}
.filter-select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 7px 10px;
  font-size: 13px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
}
.filter-select:focus { border-color: var(--accent); }
.filter-clear {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.filter-clear:hover { border-color: var(--red); color: var(--red); }

/* ── Contador de resultados ── */
.results-info {
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ── Tarjetas de café ── */
.coffee-list { display: flex; flex-direction: column; gap: 10px; }
.coffee-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.15s, transform 0.15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.45);
}
.coffee-card:hover { border-color: var(--border2); }
.coffee-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.2s;
  border-radius: var(--r) 0 0 var(--r);
}
.coffee-card.active-coffee::before { background: var(--green); }
.coffee-card.finished-coffee { opacity: 0.65; }
.coffee-card.finished-coffee::before { background: var(--text3); }
.coffee-card:active { background: var(--surface2); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.coffee-name {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.2px;
}
.coffee-sub {
  font-size: 10.5px;
  color: var(--accent2);
  margin-top: 3px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}
.coffee-rating { display: flex; gap: 1px; flex-shrink: 0; align-items: center; }
.star { color: var(--surface3); font-size: 13px; }
.star.filled { color: var(--accent2); }

.coffee-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 9px; }
.tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tag .ic { width: 11px; height: 11px; stroke-width: 2; }
.tag.price { color: var(--accent2); border-color: rgba(191,91,38,0.3); background: var(--accent-dim); }
.tag.status-open { color: var(--green); border-color: var(--green-border); background: var(--green-dim); }
.tag.status-done { color: var(--text3); }
.tag.fresh-warning { color: var(--amber); border-color: var(--amber-border); background: var(--amber-dim); }
.tag.milk { color: #7ab8d4; border-color: rgba(122,184,212,0.28); background: rgba(122,184,212,0.08); }

/* ── Tarjeta compacta ── */
.coffee-card-compact { padding: 9px 12px; }
.cc-row1 { display: flex; align-items: center; gap: 8px; }
.coffee-card-compact .coffee-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.2; }
.cc-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cc-row2 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.coffee-card-compact .coffee-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 0; }
.cc-meta2 { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.cc-qty { font-size: 10.5px; color: var(--text2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-qty small { color: var(--text3); font-weight: 400; }
.cc-actions { display: flex; gap: 3px; }
.btn-cc {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  font-size: 15px;
  font-weight: 700;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}
.btn-cc.open    { border-color: var(--green-border); color: var(--green); }
.btn-cc.finish  { border-color: rgba(191,91,38,0.4); color: var(--accent2); }
.btn-cc.consume { border-color: var(--accent); color: var(--accent2); background: var(--accent-dim); }

.coffee-notes {
  font-size: 14px;
  color: var(--text2);
  margin-top: 8px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

.card-actions { display: flex; gap: 6px; margin-top: 10px; }
.btn-quick {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text2);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-quick.open { border-color: var(--green-border); color: var(--green); }
.btn-quick.finish { border-color: rgba(191,91,38,0.4); color: var(--accent2); }

.btn-consume {
  border: 1.5px solid var(--accent);
  background: var(--accent-dim);
  color: var(--accent2);
  border-radius: var(--r-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  margin-bottom: 4px;
  transition: background 0.15s;
  letter-spacing: 0.2px;
}
.btn-consume:active { background: var(--accent-glow); }

/* ── Panel interno "consumir toma" dentro de la tarjeta ── */
.consume-block {
  margin-top: 11px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.consume-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.consume-block-label {
  font-size: 10.5px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.consume-block-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.consume-block-value small {
  color: var(--text3);
  font-weight: 400;
}
.shots-remaining { font-size: 12px; color: var(--text2); font-weight: 500; }
.shots-remaining.low-stock { color: var(--accent2); font-weight: 700; }
.low-stock-icon { font-style: normal; }
.cc-qty.low-stock { color: var(--accent2); font-weight: 700; }
.consume-block-track {
  height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  overflow: hidden;
}
.consume-block-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}
.consume-block .btn-consume {
  margin-top: 10px;
  margin-bottom: 0;
  padding: 8px;
  font-size: 13px;
}

.btn-inline-edit {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 0 3px;
  vertical-align: middle;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
}
.btn-inline-edit:hover { color: var(--text2); }
.btn-inline-edit .ic { width: 14px; height: 14px; }

.remaining-edit-row { display: flex; align-items: center; gap: 8px; flex: 1; }
.remaining-input {
  width: 72px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
}
.remaining-input:focus { border-color: var(--accent); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-icon {
  margin-bottom: 14px;
  color: var(--text3);
  display: flex;
  justify-content: center;
}
.empty-icon .ic { width: 48px; height: 48px; stroke-width: 1.2; }
.empty-state h3 {
  color: var(--text2);
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}
.empty-state p { font-size: 13px; }

/* ── Cargar más ── */
.btn-load-more {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: var(--r);
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  margin-top: 4px;
  text-align: center;
  transition: border-color 0.15s;
}
.btn-load-more:active { background: var(--surface2); }
.btn-load-more span { color: var(--text3); font-size: 12px; font-weight: 400; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
}
.stat-val {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: var(--accent2);
  line-height: 1;
  letter-spacing: -0.5px;
}
.stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.stat-sub { font-size: 12px; color: var(--text2); margin-top: 6px; font-weight: 500; }
.stat-inline-row { display: flex; align-items: flex-start; }
.stat-inline-item { flex: 1; padding: 0 14px; }
.stat-inline-item:first-child { padding-left: 0; }
.stat-inline-item:last-child { padding-right: 0; }
.stat-inline-sep { width: 1px; background: var(--border); align-self: stretch; flex-shrink: 0; }
.stat-card-stock {
  background: linear-gradient(145deg, var(--surface2), var(--surface));
  position: relative;
  overflow: hidden;
}
.stat-card-stock::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  pointer-events: none;
}
.stats-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 8px;
}
.stats-section h3 {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 12px;
}
.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bar-label {
  font-size: 12px;
  color: var(--text2);
  width: 90px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bar-track { flex: 1; background: var(--surface3); border-radius: 4px; height: 5px; overflow: hidden; }
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  transition: width 0.5s ease;
}
.bar-cnt { font-size: 11px; color: var(--text3); width: 22px; text-align: right; flex-shrink: 0; }
.bar-rating { font-size: 11px; color: var(--text3); width: 44px; text-align: right; flex-shrink: 0; }
.bar-star { color: var(--accent2); }

/* ── Stats hero (mes en curso) ── */
.stats-hero {
  background: linear-gradient(145deg, var(--surface2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.stats-hero::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, var(--accent-dim), transparent 70%);
  pointer-events: none;
}
.stats-hero-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  position: relative;
}
.stats-hero-sublabel {
  font-size: 10px;
  color: var(--text3);
  position: relative;
  margin-top: 2px;
  font-style: italic;
}
.stats-hero-big {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin-top: 4px;
  position: relative;
  letter-spacing: -0.5px;
}
.stats-hero-big-unit {
  font-size: 20px;
  color: var(--accent2);
  margin-left: 6px;
  font-weight: 600;
  font-family: 'Figtree', sans-serif;
}
.stats-hero-row {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  position: relative;
  flex-wrap: wrap;
}
.stats-hero-row > div > .v {
  font-family: 'Figtree', sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent2);
  line-height: 1;
}
.stats-hero-row > div > .k {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 700;
  margin-top: 4px;
}

/* ── Stats Gantt (calendario de consumo) ── */
.stats-gantt {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 8px;
}
.stats-gantt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.stats-gantt-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.stats-gantt-nav {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 16px;
  width: 22px;
  height: 22px;
  cursor: pointer;
}
.stats-gantt-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px;
}
.stats-gantt-scale {
  position: relative;
  height: 14px;
  margin-bottom: 4px;
}
.stats-gantt-scale-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 9px;
  color: var(--text3);
  font-weight: 600;
}
.stats-gantt-row-label {
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 3px;
}
.stats-gantt-row-track {
  position: relative;
  height: 18px;
  background: var(--surface2);
  border-radius: 4px;
}
.stats-gantt-bar {
  position: absolute;
  top: 2px; bottom: 2px;
  border-radius: 3px;
}
.stats-gantt-bar.open { background: var(--green); }
.stats-gantt-bar.finished { background: var(--accent); }

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  overflow-y: auto;
  padding: 16px;
  overscroll-behavior: contain;
}
.modal-overlay.open { display: block; }
body.modal-open { overflow: hidden; touch-action: none; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--accent2);
}
.modal-close {
  background: var(--surface3);
  border: none;
  color: var(--text2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close .ic { width: 16px; height: 16px; stroke-width: 2.2; }

/* ── Formulario ── */
.form-section {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin: 16px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 5px;
}
.form-group { margin-bottom: 12px; position: relative; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.form-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  font-size: 15px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-textarea { resize: vertical; min-height: 76px; font-family: 'Figtree', 'DM Sans', sans-serif; }

/* ── Autocompletado ── */
.ac-wrapper { position: relative; }
.ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0; right: 0;
  background: var(--surface2);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  z-index: 300;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.ac-dropdown.open { display: block; }
.ac-item { padding: 9px 13px; font-size: 14px; cursor: pointer; color: var(--text); }
.ac-item:hover, .ac-item.selected { background: var(--surface3); }
.ac-item.new-entry { color: var(--accent2); font-style: italic; }

/* ── Valoración ── */
.rating-input { display: flex; gap: 8px; }
.rating-star { font-size: 28px; cursor: pointer; color: var(--surface3); user-select: none; transition: color 0.1s; }
.rating-star.active { color: var(--accent2); }

/* ── Botones ── */
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  padding: 13px;
  font-size: 15px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  letter-spacing: 0.2px;
  transition: opacity 0.15s;
}
.btn-primary:active { opacity: 0.88; }
.btn-row { display: flex; gap: 8px; margin-top: 8px; }
.btn-row .btn-primary { margin-top: 0; }
.btn-danger {
  background: transparent;
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: var(--r);
  padding: 10px;
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  flex: 1;
  font-weight: 500;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
  border-radius: var(--r);
  padding: 10px;
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  font-weight: 500;
}

/* ── Detalle ── */
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface3);
}
.detail-label { font-size: 13px; color: var(--text3); }
.detail-val { font-size: 14px; color: var(--text); text-align: right; max-width: 60%; }

.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.detail-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid var(--border);
  color: var(--text3);
  background: var(--surface2);
}
.detail-status-badge.open { color: var(--green); border-color: var(--green-border); background: var(--green-dim); }
.detail-status-badge.done { color: var(--text3); border-color: var(--border); }
.detail-fresh-note { font-size: 11px; color: var(--amber); margin-top: 4px; }
.detail-tags-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; scrollbar-width: none; }
.detail-tags-row::-webkit-scrollbar { display: none; }
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin-bottom: 12px;
}
.detail-cell { padding: 8px 11px; border-bottom: 1px solid var(--surface3); }
.detail-cell:nth-child(odd) { border-right: 1px solid var(--surface3); }
.detail-cell-label {
  font-size: 9px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 3px;
}
.detail-cell-val { font-size: 13px; color: var(--text); }
.detail-cell.span2 { grid-column: 1/-1; border-right: none; }
.detail-cell-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.detail-chip {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.detail-actions-row { display: flex; gap: 8px; margin: 12px 0; }
.detail-actions-row .btn-brew, .detail-actions-row .btn-consume { flex: 1; width: auto; margin: 0; }
.detail-notes {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  font-style: italic;
  background: var(--surface2);
  border-left: 2px solid var(--border2);
  padding: 9px 13px;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 12px;
}

/* ── Recetas y prepas ── */
.btn-brew {
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text2);
  border-radius: var(--r-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-brew:hover, .btn-brew:active {
  border-color: var(--accent);
  color: var(--accent2);
  background: var(--accent-dim);
}
.recipe-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 4px;
}
.recipe-empty { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.recipe-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.recipe-label { font-size: 13px; color: var(--text2); font-weight: 500; flex: 1; }
.recipe-summary { font-size: 13px; color: var(--text); line-height: 1.5; }
.btn-add-recipe {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  font-size: 12px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.btn-add-recipe:hover { border-color: var(--accent); color: var(--accent2); }

.detail-brews-header {
  font-size: 10px;
  color: var(--text3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
  padding-top: 4px;
}
.detail-brew-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--surface3);
  font-size: 13px;
}
.detail-brew-date { color: var(--text3); min-width: 80px; white-space: nowrap; }
.detail-brew-summary { flex: 1; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-brew-rating { flex-shrink: 0; }

.brew-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 8px;
}
.brew-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.brew-date { font-size: 12px; color: var(--text3); flex: 1; font-weight: 500; }
.brew-rating { flex-shrink: 0; }
.btn-brew-delete {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.btn-brew-delete:hover { color: var(--red); }
.btn-brew-delete .ic { width: 15px; height: 15px; }
.brew-coffees { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.brew-coffee-tag {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
}
.brew-summary { font-size: 13px; color: var(--text); }
.brew-notes { font-size: 12px; color: var(--text3); font-style: italic; margin-top: 4px; }

.brew-star { font-size: 22px; color: var(--surface3); cursor: pointer; transition: color 0.1s; line-height: 1; }
.brew-star.active { color: var(--accent); }
.rating-stars:hover .brew-star { color: var(--accent); }
.rating-stars .brew-star:hover ~ .brew-star { color: var(--surface3); }

/* ── Catálogo ── */
.catalog-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 8px;
  overflow: hidden;
}
.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}
.catalog-header:hover { background: var(--surface2); }
.catalog-header-left { display: flex; align-items: center; gap: 8px; }
.catalog-title { font-weight: 600; font-size: 14px; }
.catalog-badge {
  background: var(--surface3);
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 10px;
  font-size: 10px;
  padding: 2px 8px;
  font-weight: 600;
}
.catalog-badge.has-orphans {
  background: var(--accent-dim);
  border-color: rgba(191,91,38,0.3);
  color: var(--accent2);
}
.catalog-body { display: none; border-top: 1px solid var(--border); }
.catalog-body.open { display: block; }
.catalog-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--surface3);
}
.catalog-row:last-child { border-bottom: none; }
.catalog-row-name { flex: 1; font-size: 14px; color: var(--text); }
.catalog-row-name.editing { display: none; }
.catalog-row-input {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
  display: none;
}
.catalog-count { font-size: 12px; color: var(--text3); min-width: 24px; text-align: right; }
.catalog-count.zero { color: var(--red); }
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent2); }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); }
.btn-icon.save { border-color: var(--green); color: var(--green); }
.btn-icon .ic { width: 14px; height: 14px; }

.btn-purge-all {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-purge-all:hover { border-color: var(--accent); color: var(--accent2); }
.catalog-purge { padding: 10px 16px; border-top: 1px solid var(--surface3); }
.btn-purge {
  background: none;
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-purge:hover { border-color: var(--red); color: var(--red); }

/* ── Cargando ── */
.loading { text-align: center; padding: 40px; color: var(--text3); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: calc(82px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; }

/* ── Advertencia freshness ── */
.fresh-warning-banner {
  background: var(--amber-dim);
  border: 1px solid var(--amber-border);
  color: var(--amber);
  border-radius: var(--r-sm);
  padding: 9px 13px;
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.4;
}

/* ── Calendario ── */
.cal-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.cal-title-text {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent2);
}
.cal-nav-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cal-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }
.cal-layout { display: flex; align-items: flex-start; gap: 0; }
.cal-names-col { flex-shrink: 0; width: 85px; display: flex; flex-direction: column; gap: 5px; margin-top: 25px; }
.cal-name { font-size: 11px; color: var(--text2); height: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; }
.cal-tracks-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cal-days-header { height: 20px; position: relative; flex-shrink: 0; margin-bottom: 0; }
.cal-day-tick { position: absolute; font-size: 9px; color: var(--text3); transform: translateX(-50%); line-height: 20px; }
.cal-track { height: 18px; position: relative; background: var(--surface2); border-radius: 4px; }
.cal-bar { position: absolute; top: 0; height: 100%; border-radius: 4px; overflow: hidden; display: flex; align-items: center; padding: 0 5px; min-width: 3px; }
.cal-bar-label { font-size: 10px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-empty { font-size: 13px; color: var(--text3); padding: 12px 0; }

/* ── Chip input ── */
.chip-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  min-height: 42px;
  align-items: center;
  transition: border-color 0.15s;
  cursor: text;
}
.chip-wrapper:focus-within { border-color: var(--accent); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 3px 8px 3px 10px;
  border-radius: 6px;
  font-size: 13px;
  white-space: nowrap;
}
.chip-x {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.chip-x:hover { color: var(--red); }
.chip-text-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 14px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  outline: none;
  min-width: 80px;
  flex: 1;
  padding: 3px 4px;
}
.chip-text-input::placeholder { color: var(--text3); }
.region-hint { font-size: 11px; color: var(--text3); margin-top: 3px; }

/* ── PIN de bloqueo ── */
.pin-lock {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pin-lock-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 36px;
  color: var(--accent2);
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.pin-lock-sub {
  font-size: 13px;
  color: var(--text3);
  font-style: italic;
  margin-bottom: 52px;
  letter-spacing: 0.2px;
}
.pin-dots { display: flex; gap: 18px; margin-bottom: 12px; }
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.pin-dot.filled { background: var(--accent); border-color: var(--accent); }
.pin-error { color: var(--red); font-size: 14px; height: 20px; margin-bottom: 16px; text-align: center; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 72px); gap: 12px; }
.pin-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  font-size: 22px;
  font-family: 'Figtree', 'DM Sans', sans-serif;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}
.pin-btn:active { background: var(--surface3); }
.pin-btn.del { color: var(--text3); }
.pin-btn.del .ic { width: 22px; height: 22px; }
.pin-btn.empty { background: transparent; border-color: transparent; cursor: default; }

/* ── Misc ── */
.sort-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sort-row label { font-size: 12px; color: var(--text3); white-space: nowrap; }
.open-date-row { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.open-date-row input { flex: 1; padding: 6px 10px; font-size: 13px; }
.modal-confirm-inner { max-width: 320px; text-align: center; }
.confirm-icon { font-size: 28px; margin-bottom: 10px; line-height: 1; }
.confirm-msg { font-size: 14px; color: var(--text2); margin-bottom: 20px; line-height: 1.5; }

/* ── Nav tabs (solo desktop) ── */
.nav-tabs {
  display: none;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-tab-btn {
  flex: none;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  height: auto;
  min-width: 0;
}
.nav-tab-btn::before { display: none; }
.nav-tab-btn.active { color: var(--accent2); background: var(--accent-dim); }
.nav-tab-btn.active::before { display: none; }

/* ── Botones de edición de brew ── */
.brew-card-actions { display: flex; gap: 4px; }
.btn-brew-edit {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.15s;
}
.btn-brew-edit:hover { color: var(--accent2); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≥768px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  /* Bottom nav → ocultar; top tabs → mostrar */
  .bottom-nav { display: none; }
  .nav-tabs { display: flex; }

  /* Nav: padding vertical para dar aire a los tabs */
  .nav { height: auto; min-height: 60px; padding: 10px 24px; gap: 16px; }

  /* Páginas: más padding lateral y sin margen de bottom-nav */
  .page { padding: 20px 28px 32px; }

  /* Coffee list y brews list: 2 columnas */
  .coffee-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #brews-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  #brews-list .brew-card { margin-bottom: 0; }

  /* Panel de filtros: 4 columnas */
  .filter-panel { grid-template-columns: repeat(4, 1fr); }

  /* Stats: hero+stock izq | gantt der; rankings full-width en 2 cols */
  #page-stats.active { display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: start; }
  #stats-hero   { grid-column: 1; grid-row: 1; }
  #stats-grid   { grid-column: 1; grid-row: 2; }
  #stats-gantt  { grid-column: 2; grid-row: 1 / span 2; }
  #stats-charts { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

  /* Modales más anchos */
  .modal { max-width: 600px; }
  #modal-detail .modal { max-width: 720px; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — Desktop (≥1200px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1200px) {
  /* Coffee list y brews list: 3 columnas */
  .coffee-list { grid-template-columns: repeat(3, 1fr); }
  #brews-list { grid-template-columns: repeat(3, 1fr); }

  /* Ancho máximo del contenido */
  #page-list, #page-brews, #page-stats, #page-catalog {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Nav acotada */
  .nav { max-width: 1440px; margin: 0 auto; left: 0; right: 0; }
}
