/* Herramientas globales: búsqueda, ficha de producto y accesos rápidos. */
.global-tools { display:flex; align-items:center; gap:8px; }
.global-search-open { min-height:38px; padding:7px 12px; }
.product-link { appearance:none; border:0; background:none; color:inherit; padding:0; min-height:0; font:inherit; font-weight:700; text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:transparent; text-underline-offset:3px; }
.product-link:hover, .product-link:focus-visible { color:var(--green, #376b52); text-decoration-color:currentColor; }
.productivity-overlay { position:fixed; inset:0; z-index:80; display:grid; background:rgba(32, 28, 22, .34); backdrop-filter:blur(3px); }
.productivity-overlay[hidden] { display:none; }
.product-sheet { width:min(520px, 94vw); height:100%; margin-left:auto; overflow:auto; padding:22px; background:#fbf7ef; box-shadow:-18px 0 60px rgba(34, 28, 19, .24); animation:product-sheet-in .3s cubic-bezier(.2,.85,.25,1.08) both; }
.product-sheet-head, .search-dialog-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.product-sheet-close { width:42px; min-width:42px; min-height:42px; padding:0; border-radius:50%; font-size:20px; }
.product-sheet-stock { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:18px 0; }
.product-sheet-stock div, .product-sheet-metric { padding:12px; border:1px solid rgba(64,82,63,.14); border-radius:14px 14px 14px 5px; background:rgba(255,255,255,.62); }
.product-sheet-stock span, .product-sheet-metric span { display:block; color:var(--muted, #706b62); font-size:12px; }
.product-sheet-stock strong, .product-sheet-metric strong { display:block; margin-top:3px; font-size:19px; }
.product-sheet-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.product-sheet-section { margin-top:22px; }
.product-sheet-section h4 { margin:0 0 8px; }
.product-sheet-list { display:grid; gap:7px; }
.product-sheet-list div { display:flex; justify-content:space-between; gap:12px; padding:8px 0; border-bottom:1px solid rgba(64,82,63,.12); }
.product-sheet-actions { position:sticky; bottom:-22px; display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:22px -22px -22px; padding:14px 22px calc(14px + env(safe-area-inset-bottom)); background:rgba(251,247,239,.96); border-top:1px solid rgba(64,82,63,.14); backdrop-filter:blur(10px); }
.global-search-dialog { align-self:start; width:min(680px, calc(100vw - 24px)); max-height:min(700px, calc(100vh - 40px)); margin:20px auto; overflow:auto; padding:20px; border-radius:22px 22px 22px 8px; background:#fbf7ef; box-shadow:0 22px 70px rgba(34,28,19,.28); animation:search-dialog-in .25s cubic-bezier(.2,.85,.25,1.04) both; }
.global-search-dialog input { width:100%; margin:14px 0 10px; font-size:17px; }
.global-search-results { display:grid; gap:6px; }
.global-search-result { display:flex; justify-content:space-between; align-items:center; gap:14px; width:100%; padding:11px 12px; text-align:left; border-radius:12px; background:rgba(255,255,255,.58); }
.global-search-result span { display:grid; gap:2px; }
.global-search-result small { color:var(--muted, #706b62); }
.quick-add { position:fixed; right:22px; bottom:22px; z-index:45; width:54px; min-width:54px; height:54px; padding:0; border-radius:50%; font-size:27px; box-shadow:0 12px 30px rgba(38,68,51,.28); }
.quick-add-menu { position:fixed; right:22px; bottom:84px; z-index:44; display:grid; gap:7px; width:210px; padding:9px; border:1px solid rgba(64,82,63,.15); border-radius:16px 16px 5px 16px; background:#fbf7ef; box-shadow:0 14px 38px rgba(34,28,19,.22); animation:quick-menu-in .2s ease-out both; }
.quick-add-menu[hidden] { display:none; }
.quick-add-menu button { text-align:left; }
.monthly-close-head { display:flex; align-items:end; justify-content:space-between; gap:12px; margin:12px 0; }
.monthly-close-head label { max-width:180px; }
.monthly-close-status { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border-radius:13px; background:rgba(255,255,255,.55); }
@keyframes product-sheet-in { from { opacity:0; transform:translateX(34px) scale(.99); } to { opacity:1; transform:none; } }
@keyframes search-dialog-in { from { opacity:0; transform:translateY(-12px) scale(.985); } to { opacity:1; transform:none; } }
@keyframes quick-menu-in { from { opacity:0; transform:translateY(8px) scale(.97); } to { opacity:1; transform:none; } }
@media (max-width:700px) {
  .global-search-open { width:40px; min-width:40px; padding:0; font-size:0; }
  .global-search-open::before { content:"⌕"; font-size:21px; }
  .quick-add { right:12px; bottom:calc(150px + env(safe-area-inset-bottom)); }
  .quick-add-menu { right:12px; bottom:calc(212px + env(safe-area-inset-bottom)); }
  .product-sheet { width:100%; padding:16px; }
  .product-sheet-grid { grid-template-columns:1fr; }
  .product-sheet-actions { bottom:-16px; margin:18px -16px -16px; padding:12px 16px calc(12px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion:reduce) { .product-sheet, .global-search-dialog, .quick-add-menu { animation:none; } }
