/* Static Map Styles for Visit Location */
.visit-location-map img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.visit-location-info {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}

.visit-location-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.visit-location-links .button {
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 12px;
  display: inline-block;
  color: white;
}

/* Custom styles for Active Admin forms */

/* Make select2 dropdowns wider in master forms */
.edit_master .select2-container,
.new_master .select2-container {
  min-width: 400px !important;
  width: 100% !important;
  max-width: 600px !important;
}

/* Style for select2 selection box */
.edit_master .select2-selection,
.new_master .select2-selection {
  min-height: 38px !important;
  padding: 4px !important;
}

/* Make the dropdown results wider only in master forms */
.edit_master .select2-dropdown,
.new_master .select2-dropdown {
  min-width: 400px !important;
}

/* General form input improvements for masters */
.edit_master input[type="text"],
.edit_master input[type="number"],
.edit_master select,
.new_master input[type="text"],
.new_master input[type="number"],
.new_master select {
  min-width: 400px;
  width: 100%;
  max-width: 600px;
}

/* Specific styles for category selects */
#master_seccion_input .select2-container,
#master_categoria_input .select2-container,
#master_subcategoria_input .select2-container,
#master_clase_input .select2-container,
#master_sector_input .select2-container,
#master_nivel1_input .select2-container,
#master_nivel2_input .select2-container,
#master_nivel3_input .select2-container {
  width: 100% !important;
  max-width: 600px !important;
}

/* Make form labels more visible */
.edit_master label,
.new_master label {
  font-weight: 600;
  color: #333;
  min-width: 150px;
  display: inline-block;
}

/* Improve form fieldset spacing */
.edit_master fieldset,
.new_master fieldset {
  margin-bottom: 2rem;
}

/* Make the form inputs container wider */
.edit_master .inputs,
.new_master .inputs {
  max-width: 900px;
}

/* Style for form list items */
.edit_master fieldset > ol > li,
.new_master fieldset > ol > li {
  margin-bottom: 1.5rem;
}

/* Improve select2 search box */
.select2-search__field {
  width: 100% !important;
  padding: 6px !important;
}

/* Better hover state for select2 options */
.select2-results__option--highlighted {
  background-color: #3b82f6 !important;
}

/* Style for disabled select2 */
.select2-container--disabled .select2-selection {
  background-color: #f3f4f6;
  cursor: not-allowed;
}

/* Ensure category hierarchy is visible */
.select2-results__option {
  padding: 8px 12px !important;
  font-size: 14px !important;
}

/* Add some spacing between form sections */
#master_seccion_input,
#master_categoria_input,
#master_subcategoria_input,
#master_clase_input,
#master_sector_input,
#master_nivel1_input,
#master_nivel2_input,
#master_nivel3_input {
  margin-bottom: 1.2rem;
}

/* Styles for Master Show Page */
.master-info-panel .panel_contents {
  padding: 20px;
}

.category-hierarchy {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.category-icon {
  margin-right: 10px;
  font-size: 18px;
}

.categorization-panel {
  background: #f0f8ff;
}

.categorization-panel h3 {
  background: #4a90e2;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.custom-categorization-panel {
  background: #f5f5ff;
}

.custom-categorization-panel h3 {
  background: #7c3aed;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.butcher-info-panel {
  background: #fff5f5;
}

.butcher-info-panel h3 {
  background: #dc2626;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.additional-info-panel {
  background: #f9fafb;
}

.additional-info-panel h3 {
  background: #6b7280;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.image-panel h3 {
  background: #10b981;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.quick-actions-panel h3 {
  background: #f59e0b;
  color: white;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

.special-status-panel h3 {
  background: #ffc107;
  color: #856404;
  padding: 10px 15px;
  margin: 0;
  font-size: 14px;
}

/* Improve attribute tables in show view */
.attributes_table th {
  width: 150px;
  font-weight: 600;
  color: #4b5563;
  background: #f9fafb;
  padding: 10px 15px;
}

.attributes_table td {
  padding: 10px 15px;
}

/* Style for product image container */
.product-image-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2px;
  border-radius: 10px;
}

.product-image-container > a {
  display: inline-block;
  background: white;
  padding: 20px;
  border-radius: 8px;
}

/* Hover effects for panels */
.panel:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Button styles in show view */
.quick-actions-panel .button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  color: white;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.quick-actions-panel .button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Status tags improvements - class-based (used by status_tag class: option) */
.status_tag.yes, .status-tag.yes {
  background: #10b981 !important;
  color: white !important;
}

.status_tag.no, .status-tag.no {
  background: #ef4444 !important;
  color: white !important;
}

.status_tag.warning, .status-tag.warning {
  background: #f59e0b !important;
  color: white !important;
}

.status_tag.primary, .status-tag.primary,
.status_tag.blue, .status-tag.blue {
  background: #3b82f6 !important;
  color: white !important;
}

.status_tag.orange, .status-tag.orange {
  background: #f97316 !important;
  color: white !important;
}

/* Status tags - data-status based (ActiveAdmin v4 uses data-status attribute) */
.status-tag[data-status="published"],
.status-tag[data-status="closed"] {
  background: #10b981 !important;
  color: white !important;
}

.status-tag[data-status="performed"] {
  background: #f97316 !important;
  color: white !important;
}

.status-tag[data-status="progress"] {
  background: #f59e0b !important;
  color: white !important;
}

.status-tag[data-status="planned"] {
  background: #3b82f6 !important;
  color: white !important;
}

.status-tag[data-status="not_published"] {
  background: #f59e0b !important;
  color: white !important;
}

.status-tag[data-status="rejected"] {
  background: #ef4444 !important;
  color: white !important;
}

.status-tag[data-status="activo"] {
  background: #10b981 !important;
  color: white !important;
}

.status-tag[data-status="inactivo"] {
  background: #ef4444 !important;
  color: white !important;
}

.status-tag[data-status="nuevo"] {
  background: #f59e0b !important;
  color: white !important;
}

/* Responsive columns for show view */
@media (max-width: 768px) {
  .columns {
    display: block !important;
  }

  .column {
    width: 100% !important;
    margin-bottom: 20px;
  }
}

/* MagnificPopup custom styles */
.mfp-bg {
  background: rgba(0, 0, 0, 0.9) !important;
}

.mfp-figure {
  background: transparent !important;
}

.mfp-container {
  padding: 40px;
}

.mfp-image-holder .mfp-close {
  color: white !important;
  font-size: 36px !important;
  opacity: 0.8;
  right: 20px;
  top: 20px;
}

.mfp-image-holder .mfp-close:hover {
  opacity: 1;
}

.mfp-title {
  color: white !important;
  font-size: 16px !important;
  padding: 8px 24px !important;
  background: rgba(0, 0, 0, 0.7);
  margin-top: 10px;
  border-radius: 4px;
}

.mfp-img {
  max-height: 90vh !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}

/* Ensure image popup links work in show view */
.product-image-container a.image-popup {
  cursor: zoom-in;
  position: relative;
  display: block;
}

.product-image-container a.image-popup:hover img {
  opacity: 0.95;
  transform: scale(1.02);
  transition: all 0.3s ease;
}

/* Add zoom icon on hover */
.product-image-container a.image-popup::after {
  content: "🔍";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.product-image-container a.image-popup:hover::after {
  opacity: 0.8;
}

/* Styles for General Categories Form */
.general_categories.new form fieldset.inputs,
.general_categories.edit form fieldset.inputs {
  padding: 0;
}

/* Styles for Custom Categories Form */
.custom_categories.new form fieldset.inputs,
.custom_categories.edit form fieldset.inputs {
  padding: 0;
}

.general_categories.new form fieldset.inputs ol,
.general_categories.edit form fieldset.inputs ol,
.custom_categories.new form fieldset.inputs ol,
.custom_categories.edit form fieldset.inputs ol {
  padding: 20px 30px;
  margin: 0;
}

.general_categories.new form fieldset.inputs ol > li,
.general_categories.edit form fieldset.inputs ol > li,
.custom_categories.new form fieldset.inputs ol > li,
.custom_categories.edit form fieldset.inputs ol > li {
  padding: 12px 0;
  margin: 0 0 15px 0;
  list-style: none;
}

.general_categories.new form fieldset.inputs ol > li label,
.general_categories.edit form fieldset.inputs ol > li label,
.custom_categories.new form fieldset.inputs ol > li label,
.custom_categories.edit form fieldset.inputs ol > li label {
  width: 25%;
  float: left;
  text-align: left;
  padding-right: 15px;
  padding-left: 0;
}

.general_categories.new form fieldset.inputs ol > li input,
.general_categories.edit form fieldset.inputs ol > li input,
.general_categories.new form fieldset.inputs ol > li select,
.general_categories.edit form fieldset.inputs ol > li select {
  width: 70%;
  float: left;
}

.level-input {
  margin-bottom: 15px;
  padding: 12px 0;
  background: transparent;
  border-radius: 5px;
  clear: both;
}

.level-input label {
  width: 25% !important;
  float: left !important;
  text-align: left !important;
  padding-right: 15px !important;
  padding-left: 0 !important;
}

.level-input input,
.level-input select {
  width: 70% !important;
  float: left !important;
}

#general_category_level_type {
  width: 100%;
  max-width: 600px;
}

#parent_selection {
  margin-top: 20px;
  margin-bottom: 20px;
  clear: both;
}

#parent_selection {
  padding: 12px 0;
  background: transparent;
  border-radius: 5px;
  margin: 15px 0;
}

#parent_selection label {
  width: 25% !important;
  float: left !important;
  text-align: left !important;
  padding-right: 15px !important;
  padding-left: 0 !important;
}

#parent_selection .select2-container {
  width: 70% !important;
  float: left !important;
}

#value_inputs {
  margin-top: 15px;
  clear: both;
}

#inherited_fields_notice {
  margin-bottom: 15px;
  margin-left: 20%;
  width: 75%;
}

/* Ensure proper field widths */
#general_category_seccion,
#general_category_categoria,
#general_category_subcategoria,
#general_category_clase {
  width: 100%;
  max-width: 600px;
}

/* Fix for form hints */
.general_categories p.inline-hints {
  margin-left: 25%;
  clear: both;
  padding-top: 5px;
  color: #666;
  font-size: 0.9em;
}

/* Fix alignment for dynamic fields */
.level-input li.input {
  clear: both;
  overflow: hidden;
}

.level-input li.input:after {
  content: "";
  display: table;
  clear: both;
}

/* Fix for boolean checkbox */
.general_categories .boolean label {
  width: auto !important;
  float: none !important;
  margin-left: 25%;
}

.general_categories .boolean input[type="checkbox"] {
  width: auto !important;
  float: none !important;
  margin-right: 10px;
}

/* Clear floats */
.general_categories form fieldset.inputs ol > li:after {
  content: "";
  display: table;
  clear: both;
}

/* Panel styles */
.general_categories .panel {
  margin-bottom: 20px;
}

.general_categories .panel h3 {
  font-size: 1.1em;
  padding: 10px 15px;
  margin: 0;
}

/* Specific styles for the form panel content */
.general_categories form .panel_contents {
  padding: 20px 30px !important;
}

/* Ensure proper spacing for fields inside panels */
.general_categories #value_inputs > div {
  padding: 12px 0;
  margin: 10px 0;
}

/* Special handling for parent_id field with Select2 - only in forms, not index */
.general_categories.new #general_category_parent_id_input .select2-container,
.general_categories.edit #general_category_parent_id_input .select2-container,
.custom_categories.new #custom_category_parent_id_input .select2-container,
.custom_categories.edit #custom_category_parent_id_input .select2-container {
  width: 70% !important;
  max-width: 600px !important;
}

/* Width for the Select2 wrapper span */
.general_categories.new #general_category_parent_id_input > span,
.general_categories.edit #general_category_parent_id_input > span,
.custom_categories.new #custom_category_parent_id_input > span,
.custom_categories.edit #custom_category_parent_id_input > span {
  width: 80% !important;
}

.general_categories li[data-field-type="parent-selection"] {
  padding: 12px 0;
  margin: 0 0 15px 0;
}

/* Style the level type selector with proper spacing */
.general_categories li.select.input.optional {
  padding: 12px 0 !important;
  margin: 0 0 15px 0 !important;
  background: transparent;
}

/* Active checkbox styling */
.general_categories li.boolean.input.optional {
  padding: 12px 0 !important;
  margin: 0 0 15px 0 !important;
  background: transparent;
}

/* Account Cards Grid Styles */
/* ActiveAdmin uses table structure for grid, so we need to style the table cells */
.custom-grid table {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 20px;
}

.custom-grid tbody {
  display: block;
  width: 100%;
}

.custom-grid tr {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  justify-content: flex-start;
}

.custom-grid td.account {
  display: block;
  width: 280px !important; /* Fixed width for all cards */
  flex: 0 0 280px; /* Prevent flex from changing the width */
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
}

/* Ensure all account cards have the same size */
.custom-grid .account-card {
  width: 280px !important; /* Fixed width */
  height: 100%;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .custom-grid td.account {
    width: 100% !important;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .custom-grid .account-card {
    width: 100% !important;
  }

  .custom-grid tr {
    flex-direction: column;
    align-items: center;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .custom-grid td.account {
    width: 260px !important;
    flex: 0 0 260px;
  }

  .custom-grid .account-card {
    width: 260px !important;
  }
}

@media (min-width: 1025px) {
  /* Default 280px width is maintained */
}

/* Spacing for pagination in Locals Summary panel */
.locals-summary-panel .panel_contents nav.pagination,
.locals-summary-panel .panel_contents .pagination {
  margin: 12px 15px 18px;
}

/* Footer pagination layout and spacing like ActiveAdmin */
.locals-summary-panel .paginated_collection_footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px; /* inner spacing so it doesn't touch panel border */
  border-top: 1px solid #e5e7eb; /* subtle separator above footer */
  background: transparent;
}

/* Reset margins for pagination inside footer to avoid collapsing with panel border */
.locals-summary-panel .paginated_collection_footer nav.pagination,
.locals-summary-panel .paginated_collection_footer .pagination {
  margin: 0; /* override top helper spacing */
}

/* Tweak info text color to match AA tone */
.locals-summary-panel .paginated_collection_footer .pagination_information {
  color: #6b7280; /* gray-600 */
}

/* Account Card Logo Link Hover Effect */
.account-card .logo-container {
  position: relative;
}

.account-card .logo-link {
  position: relative;
  display: block;
  cursor: pointer;
}

/* Ensure icon is above image */
.account-card .logo-link .link-icon {
  z-index: 100 !important;
}

/* ========================================
   Planogram Items - Bandeja Grouping
   ======================================== */

/* Group header row */
.bandeja-group-header {
  cursor: pointer;
  user-select: none;
  background: #f8fafc !important;
  border-left: 3px solid #6366f1;
}

.bandeja-group-header + .bandeja-row {
  border-top: none;
}

/* Visual separation between groups */
.bandeja-row + .bandeja-group-header td {
  border-top: 2px solid #e2e8f0;
}

.bandeja-group-header:hover {
  background: #eef2ff !important;
}

.bandeja-group-header td {
  padding: 10px 14px !important;
  border-bottom: 1px solid #e2e8f0;
}

.bandeja-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bandeja-chevron {
  width: 18px;
  text-align: center;
  color: #6366f1;
  font-size: 12px;
}

.bandeja-label {
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  letter-spacing: 0.02em;
}

.bandeja-count {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  background: #e2e8f0;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Tags for promo/laminado/pesable */
.pi-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.pi-tag-green {
  background: #dcfce7;
  color: #166534;
}

.pi-tag-blue {
  background: #dbeafe;
  color: #1e40af;
}

/* Footer summary */
.bandeja-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 12px;
  color: #64748b;
}

.bandeja-footer-total {
  font-weight: 600;
  color: #475569;
}

.bandeja-footer-sep {
  color: #cbd5e1;
  font-size: 14px;
}

.bandeja-footer-info {
  color: #94a3b8;
}

/* Dark mode */
.dark .bandeja-group-header {
  background: #1e293b !important;
  border-left-color: #818cf8;
}

.dark .bandeja-group-header:hover {
  background: #334155 !important;
}

.dark .bandeja-group-header td {
  border-bottom-color: #334155;
}

.dark .bandeja-chevron {
  color: #818cf8;
}

.dark .bandeja-label {
  color: #e2e8f0;
}

.dark .bandeja-count {
  color: #94a3b8;
  background: #334155;
}

.dark .pi-tag-green {
  background: #064e3b;
  color: #6ee7b7;
}

.dark .pi-tag-blue {
  background: #1e3a5f;
  color: #93c5fd;
}

.dark .bandeja-footer {
  background: #1e293b;
  border-color: #334155;
}

.dark .bandeja-footer-total {
  color: #cbd5e1;
}

.dark .bandeja-footer-sep {
  color: #475569;
}

.dark .bandeja-footer-info {
  color: #64748b;
}

.dark .bandeja-row + .bandeja-group-header td {
  border-top-color: #475569;
}

/* Estilos personalizados para el login de ActiveAdmin */

/* Ocultar el header y footer de ActiveAdmin en el login */
body.logged_out #header,
body.logged_out #title_bar,
body.logged_out #footer {
  display: none !important;
}

/* Remover el padding del wrapper */
body.logged_out #wrapper {
  padding: 0 !important;
}

/* Ajustar el contenido principal */
body.logged_out #active_admin_content {
  padding: 0 !important;
  margin: 0 !important;
}

/* Estilo para mensajes flash */
body.logged_out .flash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  border-radius: 0;
}

/* Animación de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logged_out form {
  animation: fadeIn 0.5s ease-out;
}
@tailwind base;
@tailwind components;
@tailwind utilities;


/*@layer components {*/
.color-header-app{
  @apply bg-gray-900 pb-24;
}

.link-menu{
  @apply text-gray-600 rounded-md bg-white bg-opacity-0 px-3 py-2 text-sm font-medium hover:bg-opacity-10 hover:text-white;
}

.boton{
  @apply inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-teal-500 hover:bg-opacity-80 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-teal-500;
}

[aria-current]:not([aria-current="false"]) {
  @apply text-white bg-gray-700;
}

.pagy-nav {
  @apply isolate inline-flex -space-x-px rounded-md shadow-sm;
  @apply text-gray-700;
}

.pagy-nav.pagination {
  @apply isolate inline-flex -space-x-px rounded-md shadow-sm;
}

.page.next a {
  @apply relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20;
}

.page.prev a {
  @apply relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20;
}

.page.next.disabled {
  @apply relative inline-flex items-center rounded-r-md border border-gray-300 bg-slate-100 px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20;
}

.page.prev.disabled {
  @apply relative inline-flex items-center rounded-l-md border border-gray-300 bg-slate-100 px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20;
}

.page a, .page.gap {
  @apply bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center border px-4 py-2 text-sm font-medium focus:z-20;
}

.page.active {
  @apply z-10 border-indigo-500 bg-indigo-50 text-indigo-600 relative inline-flex items-center border px-4 py-2 text-sm font-medium focus:z-20;
}

.pagy-info {
  @apply text-sm text-gray-700;
}

/* Client Portal - Japanese-Swiss Design Tokens */
:root {
  --jp-bg: #F7F6F3;
  --jp-text: #2D2D2D;
  --jp-muted: #6B7280;
  --jp-border: #E8E6E1;
  --jp-navy: #3D5A80;
  --jp-danger: #C53D43;
  --jp-success: #10B981;
  --jp-active-bg: #EEF2F7;
  --jp-radius: 2px;
}

/* Typography */
.font-heading {
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
}

.font-body {
  font-family: 'Sora', ui-sans-serif, system-ui, sans-serif;
}

.font-mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Buttons */
.btn-primary {
  font-family: 'Sora', sans-serif;
  @apply inline-flex items-center px-4 py-2 text-xs font-medium text-white transition-all duration-150 focus:outline-none focus:ring-2 focus:ring-offset-2;
  background: var(--jp-text);
  border-radius: var(--jp-radius);
  focus-ring-color: var(--jp-navy);
}
.btn-primary:hover { opacity: 0.85; }

.btn-secondary {
  font-family: 'Sora', sans-serif;
  @apply inline-flex items-center px-4 py-2 text-xs font-medium transition-all duration-150;
  color: var(--jp-text);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  background: transparent;
}
.btn-secondary:hover { background: var(--jp-active-bg); }

.btn-export {
  font-family: 'Sora', sans-serif;
  @apply inline-flex items-center gap-x-1.5 px-3 py-1.5 text-xs font-medium transition-all duration-150;
  color: var(--jp-text);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  background: transparent;
}
.btn-export:hover { background: var(--jp-active-bg); }

/* Form Elements */
.filter-select {
  font-family: 'Sora', sans-serif;
  @apply block w-full py-2 pl-3 pr-10 text-sm transition-shadow duration-150;
  color: var(--jp-text);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  background: white;
}
.filter-select:focus { border-color: var(--jp-navy); outline: none; box-shadow: 0 0 0 1px var(--jp-navy); }

.filter-input {
  font-family: 'Sora', sans-serif;
  @apply block w-full py-2 pl-3 text-sm transition-shadow duration-150;
  color: var(--jp-text);
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
  background: white;
}
.filter-input:focus { border-color: var(--jp-navy); outline: none; box-shadow: 0 0 0 1px var(--jp-navy); }

/* Cards - minimal with border, no shadow, transparent bg */
.card {
  @apply overflow-hidden;
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
}

.card-header {
  @apply px-5 py-3;
  border-bottom: 1px solid var(--jp-border);
}

.card-body {
  @apply px-5 py-4;
}

/* KPI Card - clean border style, transparent bg */
.kpi-card {
  @apply overflow-hidden transition-all duration-200;
  border: 1px solid var(--jp-border);
  border-radius: var(--jp-radius);
}
.kpi-card:hover { border-color: var(--jp-navy); }

/* Utilities */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Gauge animation */
@keyframes gauge-fill {
  from { stroke-dasharray: 0 326.7; }
}
.gauge-animate {
  animation: gauge-fill 1s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  .gauge-animate { animation: none; }
}
/* ==========================================================
   Gondola View V2 — Performance-optimized stylesheet
   BEM naming: .gv2-*
   No gradients on mass elements, no box-shadow per product,
   no transitions on table cells.
   ========================================================== */

/* Container */
.gv2-container {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin: 10px auto 0;
}

/* Header */
.gv2-header {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #dee2e6;
}

.gv2-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5em;
  font-weight: 600;
}

.gv2-header i {
  color: #6c757d;
  margin-right: 10px;
}

/* Stats cards */
.gv2-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}

.gv2-stat {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 15px 20px;
  min-width: 140px;
  flex: 0 1 auto;
}

.gv2-stat__label {
  font-size: 0.75em;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
  font-weight: 600;
}

.gv2-stat__value {
  font-size: 1.8em;
  font-weight: bold;
  color: #212529;
  line-height: 1;
  margin: 5px 0;
}

.gv2-stat__sub {
  font-size: 0.85em;
  color: #6c757d;
  margin-top: 2px;
}

/* Stat card variants */
.gv2-stat--alert .gv2-stat__value { color: #dc3545; }
.gv2-stat--alert-has { background: #fff5f5; border-color: #feb2b2; }
.gv2-stat--alert-ok  { background: #f0fdf4; border-color: #86efac; }
.gv2-stat--alert-ok .gv2-stat__value { color: #16a34a; }
.gv2-stat--success { background: #f0fdf4; border-color: #86efac; }
.gv2-stat--success .gv2-stat__value { color: #16a34a; }
.gv2-stat--warning { background: #fffbeb; border-color: #fde68a; }
.gv2-stat--warning .gv2-stat__value { color: #f59e0b; }
.gv2-stat--info { background: #eff6ff; border-color: #93c5fd; }
.gv2-stat--info .gv2-stat__value { color: #2563eb; }

/* Legend */
.gv2-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  padding: 15px;
  background: white;
  border-radius: 8px;
}

.gv2-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gv2-legend__color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.gv2-legend__text {
  font-size: 0.85em;
  color: #495057;
}

/* No-master section */
.gv2-nomaster {
  background: white;
  border: 2px solid #dc3545;
  border-radius: 8px;
  margin: 20px 0;
  overflow: hidden;
}

.gv2-nomaster__header {
  background: #dc3545;
  color: white;
  padding: 15px 20px;
  cursor: pointer;
  user-select: none;
}

.gv2-nomaster__header:hover {
  background: #c82333;
}

.gv2-nomaster__header h3 {
  margin: 0;
  font-size: 1.2em;
  font-weight: 600;
  color: white !important;
}

.gv2-nomaster__body {
  padding: 20px;
  background: #fff5f5;
  max-height: 400px;
  overflow-y: auto;
}

.gv2-nomaster__body.collapsed {
  display: none;
}

.gv2-nomaster__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 15px;
}

.gv2-nomaster__card {
  background: white;
  border: 1px solid #feb2b2;
  border-radius: 6px;
  padding: 12px;
}

.gv2-nomaster__card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.gv2-nomaster__badge {
  background: #dc3545;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
  font-weight: bold;
}

.gv2-nomaster__module-info {
  font-size: 0.85em;
  color: #6c757d;
  font-weight: 600;
}

.gv2-nomaster__ean {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.gv2-nomaster__ean label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9em;
}

.gv2-nomaster__ean-value {
  font-family: monospace;
  font-size: 1.1em;
  color: #212529;
  font-weight: bold;
}

.gv2-nomaster__info-row {
  font-size: 0.85em;
  color: #6c757d;
  margin: 4px 0;
}

.gv2-nomaster__info-row i {
  width: 16px;
  margin-right: 5px;
}

.gv2-nomaster__actions {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.gv2-nomaster__btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #dee2e6;
  background: white;
  color: #495057;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.gv2-nomaster__btn:hover {
  transform: translateY(-1px);
}

.gv2-nomaster__btn--locate:hover { background: #17a2b8; color: white; border-color: #17a2b8; }
.gv2-nomaster__btn--edit:hover   { background: #ffc107; color: #212529; border-color: #ffc107; }
.gv2-nomaster__btn--create:hover { background: #28a745; color: white; border-color: #28a745; }

/* Filter buttons */
.gv2-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.gv2-filters__btn {
  padding: 10px 20px;
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.gv2-filters__btn:hover {
  background: #f8f9fa;
}

.gv2-filters__btn--active {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

/* Category header */
.gv2-category {
  background: #495057;
  color: white;
  padding: 15px;
  text-align: center;
  font-size: 1.2em;
  font-weight: bold;
  margin: 30px 0 10px 0;
  border-radius: 8px 8px 0 0;
}

/* Gondola shelf / table */
.gv2-shelf {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0 0 20px 0;
}

.gv2-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.gv2-table th {
  background: #343a40;
  color: white;
  padding: 12px 8px;
  text-align: center;
  font-weight: 600;
  font-size: 0.9em;
  border-right: 1px solid #6c757d;
  position: sticky;
  top: 0;
  z-index: 10;
}

.gv2-table th:last-child {
  border-right: none;
}

.gv2-table .gv2-th--module {
  background: #0056b3;
  color: white;
  font-size: 1.1em;
  letter-spacing: 0.5px;
  border-left: 3px solid #343a40 !important;
  border-right: 3px solid #343a40 !important;
}

.gv2-table .gv2-th--module:first-of-type {
  border-left: none !important;
}

.gv2-table .gv2-td--bandeja {
  background: #138496 !important;
  color: white !important;
  font-weight: 600;
  padding: 10px;
  text-align: center;
  width: 80px;
  font-size: 0.85em;
  border-right: 2px solid #dee2e6;
}

.gv2-table td {
  border: 1px solid #e9ecef;
  padding: 4px;
  vertical-align: top;
  min-width: 120px;
  background: white;
}

.gv2-table td.gv2-td--separator {
  border-left: 4px solid #343a40 !important;
}

.gv2-table tr:nth-child(even) td:not(.gv2-td--bandeja) {
  background: #f8f9fa;
}

/* Module header links */
.gv2-module-links {
  display: inline-flex;
  gap: 8px;
  margin-left: 8px;
}

.gv2-module-links a {
  text-decoration: none;
}

.gv2-module-links a i {
  font-size: 0.85em;
  color: white;
  opacity: 0.9;
  cursor: pointer;
}

.gv2-module-links a:hover i {
  opacity: 1;
}

/* Product slot */
.gv2-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  min-height: 80px;
  position: relative;
}

/* Empty slot */
.gv2-slot--empty {
  border: 2px dashed #dee2e6;
  background: #f8f9fa;
  min-height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  font-size: 0.8em;
}

/* Product item — FLAT colors, no gradients, no individual box-shadow */
.gv2-product {
  background: #95a5a6;
  color: white;
  padding: 10px 8px;
  border-radius: 8px;
  text-align: center;
  width: 100%;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.gv2-product:hover {
  filter: brightness(1.1);
}

.gv2-product--main-provider {
  background: #3a7bd5;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.gv2-product--promo {
  background: #e67e22;
  color: #fff;
}

.gv2-product--laminado {
  background: #1abc9c;
}

.gv2-product--no-master {
  background: #dc3545;
  border: 2px dashed #ffc107;
}

/* Product sub-elements */
.gv2-product__no-master-tag {
  position: absolute;
  top: 2px;
  left: 2px;
  background: #ffc107;
  color: #212529;
  font-size: 0.6em;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: bold;
}

.gv2-product__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  background-color: white;
  border: 2px solid rgba(255,255,255,0.9);
  cursor: zoom-in;
  z-index: 3;
}

.gv2-product__pos {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 0.6em;
  padding: 1px 4px;
  border-radius: 3px;
}

.gv2-product__ean {
  font-size: 0.75em;
  font-weight: bold;
  margin-bottom: 4px;
  word-break: break-all;
}

.gv2-product__caras {
  background: rgba(255, 255, 255, 0.3);
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 0.7em;
  margin-top: 4px;
  display: inline-block;
}

.gv2-product__price {
  font-size: 0.65em;
  margin-top: 2px;
  opacity: 0.9;
}

.gv2-product__promo-tag {
  font-size: 0.6em;
  margin-top: 2px;
}

/* Tooltip — single global element, transitions allowed here */
.gv2-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.95);
  color: white;
  border-radius: 8px;
  font-size: 0.85em;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  min-width: 280px;
  max-width: 380px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow: hidden;
}

.gv2-tooltip--visible {
  opacity: 1;
  visibility: visible;
}

.gv2-tooltip__image {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
  display: block;
  border-bottom: 1px solid #e9ecef;
}

.gv2-tooltip__info {
  font-size: 12px;
  line-height: 1.5;
  color: ghostwhite;
  text-align: left;
  padding: 10px;
}

.gv2-tooltip__info strong {
  color: white;
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 5px;
}

.gv2-tooltip__info span {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

.gv2-tooltip__info i {
  width: 18px;
  color: whitesmoke;
  margin-right: 6px;
  font-size: 11px;
}

/* Photo modal */
.gv2-photo-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.gv2-photo-modal__img {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.gv2-photo-modal__caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  font-size: 18px;
}

.gv2-photo-modal__close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.gv2-photo-modal__close:hover {
  color: #ffc107;
}

/* Edit item modal — transitions OK for single modal */
.gv2-edit-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6);
}

.gv2-edit-modal__content {
  background-color: #fefefe;
  margin: 2% auto;
  padding: 0;
  border: 1px solid #888;
  width: 95%;
  max-width: 1400px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  z-index: 1001;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.gv2-edit-modal__header {
  padding: 20px 25px;
  background: #5a67d8;
  color: white;
  border-radius: 10px 10px 0 0;
  position: relative;
}

.gv2-edit-modal__header h2 {
  margin: 0;
  font-size: 1.5em;
  color: white;
}

.gv2-edit-modal__close {
  color: white;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 20px;
}

.gv2-edit-modal__close:hover {
  color: #ffc107;
}

.gv2-edit-modal__body {
  padding: 20px;
  display: flex;
  gap: 30px;
  overflow-y: auto;
  flex: 1;
  position: relative;
}

.gv2-edit-modal__form-section {
  flex: 1;
  position: relative;
  z-index: 1;
  min-width: 400px;
}

.gv2-edit-modal__image-section {
  flex: 0 0 45%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gv2-edit-modal__image-section img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  cursor: zoom-in;
}

.gv2-edit-modal__footer {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-radius: 0 0 10px 10px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Form styles in modal */
.gv2-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.gv2-form__section-title {
  grid-column: span 2;
  font-size: 0.95em;
  font-weight: 600;
  color: #495057;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
  margin-top: 15px;
  margin-bottom: 5px;
}

.gv2-form__section-title:first-child {
  margin-top: 0;
}

.gv2-form__section-title i {
  margin-right: 8px;
  color: #5a67d8;
}

.gv2-form__group {
  display: flex;
  flex-direction: column;
}

.gv2-form__group--full {
  grid-column: span 2;
}

.gv2-form__group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #495057;
  font-size: 0.9em;
}

.gv2-form__group input,
.gv2-form__group select {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 1em;
  background-color: white;
}

.gv2-form__group input:focus,
.gv2-form__group select:focus {
  outline: none;
  border-color: #5a67d8;
  box-shadow: 0 0 0 3px rgba(90, 103, 216, 0.15);
}

/* Buttons */
.gv2-btn {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
}

.gv2-btn--primary {
  background: #5a67d8;
  color: white;
}

.gv2-btn--primary:hover {
  background: #4c51bf;
}

.gv2-btn--secondary {
  background: #6c757d;
  color: white;
}

.gv2-btn--secondary:hover {
  background: #5a6268;
}

/* EAN check */
.gv2-ean-check-btn {
  padding: 0 15px;
  background: #5a67d8;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
}

.gv2-ean-check-btn:hover {
  background: #4c51bf;
}

.gv2-ean-validation {
  margin-top: 5px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gv2-ean-validation--checking { color: #856404; }
.gv2-ean-validation--valid    { color: #155724; }
.gv2-ean-validation--invalid  { color: #721c24; }
.gv2-ean-validation--pesable  { color: #004085; background: #cce5ff; padding: 4px 8px; border-radius: 4px; margin-top: 5px; }

/* Master info section */
.gv2-master-info {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 20px;
}

.gv2-master-info__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.gv2-master-info__header h4 {
  margin: 0;
  color: #495057;
  font-size: 1.1em;
}

.gv2-master-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
}

.gv2-master-status--exists     { background: #d4edda; color: #155724; }
.gv2-master-status--not-exists { background: #f8d7da; color: #721c24; }

.gv2-master-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.gv2-master-detail__label {
  font-size: 0.85em;
  color: #6c757d;
  margin-bottom: 2px;
}

.gv2-master-detail__value {
  font-size: 0.95em;
  color: #212529;
  font-weight: 500;
}

.gv2-master-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.gv2-btn-master {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #495057;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gv2-btn-master:hover {
  background: #5a67d8;
  color: white;
  border-color: #5a67d8;
  text-decoration: none;
}

.gv2-btn-master--primary {
  background: #5a67d8;
  color: white;
  border: none;
}

.gv2-btn-master--primary:hover {
  background: #4c51bf;
}

/* Loading spinner */
.gv2-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #5a67d8;
  border-radius: 50%;
  animation: gv2-spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes gv2-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Image fullscreen btn */
.gv2-fullscreen-btn {
  margin-top: 10px;
  background: #5a67d8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.gv2-fullscreen-btn:hover {
  background: #4c51bf;
}

/* Highlight animation (only applied to single element via JS) */
.gv2-product--highlighted {
  animation: gv2-highlight-pulse 1s ease-in-out 3;
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.8);
  transform: scale(1.05);
  z-index: 1000;
  position: relative;
}

@keyframes gv2-highlight-pulse {
  0%   { box-shadow: 0 0 20px rgba(255, 193, 7, 0.8); }
  50%  { box-shadow: 0 0 40px rgba(255, 193, 7, 1); }
  100% { box-shadow: 0 0 20px rgba(255, 193, 7, 0.8); }
}

/* Action buttons */
.gv2-actions {
  text-align: center;
  margin: 30px 0;
}

.gv2-actions a,
.gv2-actions button {
  margin: 0 10px;
}

/* Notification toast */
.gv2-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  max-width: 350px;
  min-width: 250px;
}

.gv2-toast--visible {
  opacity: 1;
  transform: translateX(0);
}

.gv2-toast__content {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.gv2-toast__content i { font-size: 18px; }

.gv2-toast--success { border-left: 4px solid #28a745; }
.gv2-toast--success i { color: #28a745; }
.gv2-toast--error   { border-left: 4px solid #dc3545; }
.gv2-toast--error i   { color: #dc3545; }
.gv2-toast--warning { border-left: 4px solid #ffc107; }
.gv2-toast--warning i { color: #ffc107; }
.gv2-toast--info    { border-left: 4px solid #17a2b8; }
.gv2-toast--info i    { color: #17a2b8; }

/* Responsive */
@media (max-width: 1200px) {
  .gv2-edit-modal__content {
    width: 98%;
    max-width: none;
  }

  .gv2-edit-modal__body {
    flex-direction: column;
  }

  .gv2-edit-modal__image-section {
    flex: none;
    width: 100%;
    order: -1;
  }

  .gv2-edit-modal__image-section img {
    max-height: 300px;
  }
}

/* Helper classes */
.gv2-text-muted { color: #6c757d; }
.gv2-master-product-img { max-width: 100%; height: 120px; object-fit: contain; border-radius: 4px; border: 1px solid #dee2e6; cursor: zoom-in; }
.gv2-input-replacement { padding: 10px 12px; border: 1px solid #ced4da; border-radius: 6px; font-size: 1em; width: 100%; background-color: white; color: inherit; box-sizing: border-box; }

/* ── Dark mode ──────────────────────────────────────────────────────── */
.dark .gv2-container { background: #1e293b; }

.dark .gv2-header { border-bottom-color: #475569; }
.dark .gv2-header h2 { color: #e2e8f0; }
.dark .gv2-header i { color: #94a3b8; }

/* Stat cards */
.dark .gv2-stat { background: #334155; border-color: #475569; }
.dark .gv2-stat__label { color: #94a3b8; }
.dark .gv2-stat__value { color: #f1f5f9; }
.dark .gv2-stat__sub { color: #94a3b8; }
.dark .gv2-stat--alert-has { background: #451a1a; border-color: #991b1b; }
.dark .gv2-stat--alert-ok { background: #14532d; border-color: #166534; }
.dark .gv2-stat--success { background: #14532d; border-color: #166534; }
.dark .gv2-stat--warning { background: #422006; border-color: #854d0e; }
.dark .gv2-stat--info { background: #1e3a5f; border-color: #1e40af; }

/* Legend */
.dark .gv2-legend { background: #334155; }
.dark .gv2-legend__text { color: #cbd5e1; }

/* No-master section */
.dark .gv2-nomaster { background: #334155; }
.dark .gv2-nomaster__body { background: #2d1b1b; }
.dark .gv2-nomaster__card { background: #334155; border-color: #991b1b; }
.dark .gv2-nomaster__card-head { border-bottom-color: #475569; }
.dark .gv2-nomaster__module-info { color: #94a3b8; }
.dark .gv2-nomaster__ean { background: #1e293b; }
.dark .gv2-nomaster__ean label { color: #cbd5e1; }
.dark .gv2-nomaster__ean-value { color: #f1f5f9; }
.dark .gv2-nomaster__info-row { color: #94a3b8; }
.dark .gv2-nomaster__btn { background: #1e293b; color: #cbd5e1; border-color: #475569; }

/* Filter buttons */
.dark .gv2-filters__btn { background: #334155; color: #cbd5e1; border-color: #475569; }
.dark .gv2-filters__btn:hover { background: #475569; }

/* Category header */
.dark .gv2-category { background: #334155; }

/* Table / shelf */
.dark .gv2-shelf { background: #334155; border-color: #475569; }
.dark .gv2-table td { border-color: #475569; background: #1e293b; color: #e2e8f0; }
.dark .gv2-table tr:nth-child(even) td:not(.gv2-td--bandeja) { background: #273549; }
.dark .gv2-table td.gv2-td--separator { border-left-color: #1e293b !important; }

/* Empty slot */
.dark .gv2-slot--empty { border-color: #475569; background: #1e293b; color: #64748b; }

/* Edit modal */
.dark .gv2-edit-modal__content { background-color: #1e293b; border-color: #475569; }
.dark .gv2-edit-modal__body { color: #e2e8f0; }
.dark .gv2-edit-modal__footer { background: #334155; border-top-color: #475569; }
.dark .gv2-edit-modal__image-section img { box-shadow: 0 4px 12px rgba(0,0,0,0.4); }

/* Form in modal */
.dark .gv2-form__section-title { color: #cbd5e1; border-bottom-color: #475569; }
.dark .gv2-form__group label { color: #cbd5e1; }
.dark .gv2-form__group input,
.dark .gv2-form__group select { background-color: #334155; border-color: #475569; color: #e2e8f0; }

/* EAN validation */
.dark .gv2-ean-validation--checking { color: #fbbf24; }
.dark .gv2-ean-validation--valid { color: #4ade80; }
.dark .gv2-ean-validation--invalid { color: #f87171; }
.dark .gv2-ean-validation--pesable { color: #60a5fa; background: #1e3a5f; }

/* Master info */
.dark .gv2-master-info { background: #334155; border-color: #475569; }
.dark .gv2-master-info__header h4 { color: #cbd5e1; }
.dark .gv2-master-detail__label { color: #94a3b8; }
.dark .gv2-master-detail__value { color: #f1f5f9; }
.dark .gv2-master-status--exists { background: #14532d; color: #4ade80; }
.dark .gv2-master-status--not-exists { background: #451a1a; color: #f87171; }
.dark .gv2-btn-master { background: #1e293b; color: #cbd5e1; border-color: #475569; }
.dark .gv2-btn-master:hover { background: #5a67d8; color: white; border-color: #5a67d8; }

/* Spinner */
.dark .gv2-spinner { border-color: #475569; border-top-color: #5a67d8; }

/* Helpers */
.dark .gv2-text-muted { color: #94a3b8; }
.dark .gv2-master-product-img { border-color: #475569; }
.dark .gv2-input-replacement { background-color: #334155; border-color: #475569; color: #e2e8f0; }

/* Toast */
.dark .gv2-toast { background: #334155; color: #e2e8f0; }
.dark .gv2-toast__content { color: #e2e8f0; }

/* Print */
@media print {
  .gv2-actions,
  .gv2-nomaster,
  .gv2-filters,
  .gv2-edit-modal,
  .gv2-photo-modal,
  .gv2-tooltip,
  .gv2-toast,
  .header,
  .sidebar,
  .footer,
  #active_admin_content > .action_items {
    display: none !important;
  }

  .gv2-container {
    margin: 0;
    padding: 10px;
  }

  .gv2-table {
    font-size: 0.8em;
  }

  .gv2-product {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(/images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(/images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(/images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
/* ── Module View – Visual Shelf ───────────────────────────── */

.mv-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Header ──────────────────────────────────────────────── */
.mv-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.dark .mv-header {
  background: #1e293b;
  border-color: #334155;
}

.mv-header__photo {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  cursor: pointer;
}

.dark .mv-header__photo { border-color: #475569; }

.mv-header__info { flex: 1; }

.mv-header__title {
  margin: 0 0 6px;
  font-size: 1.3em;
  font-weight: 700;
  color: #1e293b;
}

.dark .mv-header__title { color: #f1f5f9; }

.mv-header__meta {
  margin: 0;
  font-size: 0.9em;
  color: #64748b;
  line-height: 1.6;
}

.dark .mv-header__meta { color: #94a3b8; }

.mv-header__meta strong { color: #334155; }
.dark .mv-header__meta strong { color: #cbd5e1; }

/* ── Stats bar ───────────────────────────────────────────── */
.mv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.mv-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.85em;
  color: #475569;
}

.dark .mv-stat {
  background: #1e293b;
  border-color: #334155;
  color: #94a3b8;
}

.mv-stat__value {
  font-weight: 700;
  color: #1e293b;
}

.dark .mv-stat__value { color: #f1f5f9; }

.mv-stat--alert .mv-stat__value { color: #dc2626; }
.dark .mv-stat--alert .mv-stat__value { color: #f87171; }

.mv-stat--warning .mv-stat__value { color: #d97706; }
.dark .mv-stat--warning .mv-stat__value { color: #fbbf24; }

.mv-toggles {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mv-stat--toggle {
  gap: 8px;
}

/* ── Toggle switch ──────────────────────────────────────── */
.mv-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
}

.mv-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.mv-toggle__slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #cbd5e1;
  border-radius: 20px;
  transition: background 0.2s;
}

.mv-toggle__slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.mv-toggle input:checked + .mv-toggle__slider {
  background: #3b82f6;
}

.mv-toggle input:checked + .mv-toggle__slider::before {
  transform: translateX(16px);
}

.dark .mv-toggle__slider {
  background: #475569;
}

.dark .mv-toggle input:checked + .mv-toggle__slider {
  background: #3b82f6;
}

/* ── Shelf unit ──────────────────────────────────────────── */
.mv-shelf {
  border: 2px solid #94a3b8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow-x: auto;
}

.dark .mv-shelf {
  background: #0f172a;
  border-color: #475569;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ── Bandeja (shelf row) ─────────────────────────────────── */
.mv-bandeja {
  display: flex;
  align-items: flex-end;
  min-height: 140px;
  padding: 8px 8px 0;
}

.mv-bandeja__label {
  flex-shrink: 0;
  width: 40px;
  text-align: center;
  font-size: 0.75em;
  font-weight: 700;
  color: #64748b;
  padding-bottom: 8px;
  line-height: 1.2;
}

.dark .mv-bandeja__label { color: #94a3b8; }

.mv-bandeja__label span {
  display: block;
  font-size: 1.4em;
  color: #334155;
}

.dark .mv-bandeja__label span { color: #e2e8f0; }

.mv-bandeja__items {
  display: flex;
  align-items: stretch;
  gap: 4px;
  flex: 1;
  padding-bottom: 4px;
}

/* Shelf divider (metal bar) */
.mv-divider {
  height: 6px;
  background: linear-gradient(180deg, #d1d5db 0%, #9ca3af 40%, #b0b6bf 60%, #d1d5db 100%);
  border-radius: 1px;
  margin: 0 8px;
}

.dark .mv-divider {
  background: linear-gradient(180deg, #475569 0%, #334155 40%, #3f4f63 60%, #475569 100%);
}

/* Last divider = shelf bottom */
.mv-divider--bottom {
  height: 8px;
  border-radius: 0 0 6px 6px;
  margin: 0;
}

/* ── Product card ────────────────────────────────────────── */
.mv-product {
  flex-shrink: 0;
  width: 120px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.15s;
  cursor: default;
}

.mv-product:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.dark .mv-product {
  background: #1e293b;
  border-color: #334155;
}

.dark .mv-product:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Promo highlight */
.mv-product[data-promo="true"] {
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
}

.dark .mv-product[data-promo="true"] {
  border-left-color: #d97706;
  background: #1c1a0e;
}

/* Fill mode: items expand to fill bandeja */
.mv-shelf--fill .mv-product {
  flex: 1 1 0;
  width: auto;
  min-width: 100px;
}

.mv-shelf--fill .mv-product--empty {
  display: none;
}

/* Empty position */
.mv-product--empty {
  border-style: dashed;
  border-color: #cbd5e1;
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
}

.dark .mv-product--empty { border-color: #475569; }

.mv-product--empty i {
  font-size: 1.4em;
  color: #94a3b8;
  margin-bottom: 4px;
}

/* Product image */
.mv-product__img-wrap {
  position: relative;
  width: 100%;
  height: 80px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  background: #f8fafc;
}

.dark .mv-product__img-wrap { background: #0f172a; }

.mv-product__img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  cursor: pointer;
}

.mv-product__no-img {
  font-size: 2em;
  color: #cbd5e1;
}

.dark .mv-product__no-img { color: #475569; }

/* Position badge */
.mv-product__pos {
  position: absolute;
  top: 2px;
  left: 2px;
  font-size: 0.65em;
  font-weight: 700;
  background: rgba(30,41,59,0.7);
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.3;
}

/* Product info */
.mv-product__desc {
  font-size: 0.7em;
  line-height: 1.3;
  color: #334155;
  max-height: 2.6em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 2px;
}

.dark .mv-product__desc { color: #cbd5e1; }

.mv-product__ean {
  font-size: 0.6em;
  color: #94a3b8;
  font-family: monospace;
  margin-bottom: 2px;
}

.dark .mv-product__ean { color: #64748b; }

.mv-product__details {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 0.65em;
  color: #64748b;
}

.dark .mv-product__details { color: #94a3b8; }

.mv-product__details strong { color: #334155; }

.mv-product__promo {
  color: #d97706;
}

.dark .mv-product__promo { color: #fbbf24; }
.dark .mv-product__details strong { color: #e2e8f0; }

/* Badges */
.mv-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  margin-top: 3px;
}

.mv-badge {
  font-size: 0.6em;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  line-height: 1.4;
  text-transform: uppercase;
}

.mv-badge--promo {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.dark .mv-badge--promo {
  background: #451a03;
  color: #fbbf24;
  border-color: #b45309;
}

.mv-badge--no-master {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.dark .mv-badge--no-master {
  background: #450a0a;
  color: #f87171;
  border-color: #dc2626;
}

.mv-badge--precio {
  background: #ecfdf5;
  color: #065f46;
}

.dark .mv-badge--precio {
  background: #022c22;
  color: #6ee7b7;
}

/* ── Edit button on product card ─────────────────────────── */
.mv-product__edit-btn {
  display: none;
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 4px;
  background: rgba(59,130,246,0.85);
  color: #fff;
  font-size: 0.65em;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.mv-product__edit-btn:hover { background: rgba(37,99,235,1); }

.mv-product { position: relative; }
.mv-product:hover .mv-product__edit-btn { display: flex; }

/* ── Modal ───────────────────────────────────────────────── */
.mv-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.mv-modal__content {
  background: #fff;
  border-radius: 10px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  overflow: hidden;
}

.dark .mv-modal__content {
  background: #1e293b;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.mv-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
}

.dark .mv-modal__header { border-color: #334155; }

.mv-modal__header h3 {
  margin: 0;
  font-size: 1em;
  color: #1e293b;
}

.dark .mv-modal__header h3 { color: #f1f5f9; }

.mv-modal__close {
  background: none;
  border: none;
  font-size: 1.4em;
  cursor: pointer;
  color: #94a3b8;
  padding: 0;
  line-height: 1;
}

.mv-modal__close:hover { color: #475569; }
.dark .mv-modal__close:hover { color: #e2e8f0; }

.mv-modal__subheader {
  padding: 8px 18px;
  font-size: 0.8em;
  color: #64748b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.dark .mv-modal__subheader {
  color: #94a3b8;
  background: #0f172a;
  border-color: #334155;
}

.mv-modal__body { padding: 16px 18px; }

.mv-form__group {
  margin-bottom: 12px;
}

.mv-form__group label {
  display: block;
  font-size: 0.8em;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

.dark .mv-form__group label { color: #94a3b8; }

.mv-form__group input,
.mv-form__group select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 0.9em;
  background: #fff;
  color: #1e293b;
  box-sizing: border-box;
}

.dark .mv-form__group input,
.dark .mv-form__group select {
  background: #0f172a;
  border-color: #475569;
  color: #f1f5f9;
}

.mv-form__group input:focus,
.mv-form__group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,0.2);
}

.mv-form__row {
  display: flex;
  gap: 10px;
}

.mv-form__row .mv-form__group { flex: 1; }

.mv-modal__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid #e2e8f0;
}

.dark .mv-modal__footer { border-color: #334155; }

.mv-modal__status {
  margin-right: auto;
  font-size: 0.8em;
}

.mv-modal__status--ok { color: #16a34a; }
.dark .mv-modal__status--ok { color: #4ade80; }

.mv-modal__status--error { color: #dc2626; }
.dark .mv-modal__status--error { color: #f87171; }

.mv-modal__btn {
  padding: 7px 16px;
  border-radius: 5px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.mv-modal__btn--cancel {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.dark .mv-modal__btn--cancel {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

.mv-modal__btn--cancel:hover { background: #e2e8f0; }
.dark .mv-modal__btn--cancel:hover { background: #475569; }

.mv-modal__btn--save {
  background: #3b82f6;
  color: #fff;
}

.mv-modal__btn--save:hover { background: #2563eb; }

.mv-modal__btn--save:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Price Reference ─────────────────────────────────────── */
.mv-price-ref {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.dark .mv-price-ref { border-color: #334155; }

.mv-price-ref__title {
  font-size: 0.75em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.dark .mv-price-ref__title { color: #94a3b8; }

.mv-price-ref__body {
  font-size: 0.82em;
}

.mv-price-ref__spinner {
  color: #94a3b8;
  font-size: 0.85em;
}

.mv-price-ref__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 3px;
  background: #f8fafc;
}

.dark .mv-price-ref__row { background: #0f172a; }

.mv-price-ref__label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9em;
}

.dark .mv-price-ref__label { color: #cbd5e1; }

.mv-price-ref__stats {
  display: flex;
  gap: 10px;
  color: #64748b;
  font-size: 0.9em;
}

.dark .mv-price-ref__stats { color: #94a3b8; }

.mv-price-ref__stats strong {
  color: #1e293b;
}

.dark .mv-price-ref__stats strong { color: #f1f5f9; }

.mv-price-ref__count {
  font-size: 0.8em;
  color: #94a3b8;
  margin-left: 4px;
}

.mv-price-ref__warn {
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.82em;
  font-weight: 600;
}

.dark .mv-price-ref__warn {
  background: #450a0a;
  border-color: #7f1d1d;
  color: #fca5a5;
}

.mv-price-ref__section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.dark .mv-price-ref__section { border-color: #334155; }

.mv-price-ref__section-title {
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-bottom: 4px;
}

.dark .mv-price-ref__section-title { color: #94a3b8; }

.mv-price-ref__row--market {
  padding: 3px 6px;
}

.mv-price-ref__regular {
  color: #94a3b8;
  font-size: 0.9em;
  margin-right: 2px;
}

.mv-price-ref__promo {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.8em;
  font-weight: 600;
  padding: 0 5px;
  border-radius: 3px;
  margin-left: 6px;
}

.dark .mv-price-ref__promo {
  background: #451a03;
  color: #fbbf24;
}

/* ── Shelf + Photo layout ───────────────────────────────── */
.mv-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.mv-layout__shelf {
  flex: 1;
  min-width: 0;
}

.mv-layout__photo {
  flex-shrink: 0;
  width: 460px;
}

.mv-layout__photo-sticky {
  position: sticky;
  top: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.dark .mv-layout__photo-sticky {
  background: #1e293b;
  border-color: #334155;
}

.mv-layout__photo-label {
  padding: 8px 12px;
  font-size: 0.8em;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.dark .mv-layout__photo-label {
  color: #94a3b8;
  border-color: #334155;
}

.mv-layout__photo-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}

@media (max-width: 900px) {
  .mv-layout {
    flex-direction: column;
  }

  .mv-layout__photo {
    width: 100%;
    order: -1;
  }

  .mv-layout__photo-sticky {
    position: static;
  }

  .mv-layout__photo-img {
    max-height: 300px;
    object-fit: contain;
  }
}

/* ── Empty state ─────────────────────────────────────────── */
.mv-empty {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
}

.mv-empty i {
  font-size: 2.5em;
  margin-bottom: 12px;
  display: block;
}

/* ── Print styles ────────────────────────────────────────── */
@page {
  size: portrait;
  margin: 8mm;
}

@media print {
  /* Reset page layout */
  html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    font-size: 10px;
  }

  .mv-container { max-width: 100%; padding: 0; margin: 0; }

  /* Hide AA chrome */
  #header, #title_bar, .action_items,
  #footer, #sidebar, .flashes,
  .breadcrumb, #utility_nav { display: none !important; }

  #active_admin_content { margin: 0; padding: 0; }
  #wrapper { margin: 0; padding: 0; }

  /* Header compact */
  .mv-header {
    padding: 4px 8px;
    margin-bottom: 4px;
    border: none;
    background: none;
  }

  .mv-header__meta { font-size: 0.8em; line-height: 1.3; }

  /* Stats – single compact line */
  .mv-stats {
    margin-bottom: 4px;
    gap: 3px;
  }

  .mv-stat { padding: 2px 6px; font-size: 0.75em; border: none; background: none; }
  .mv-toggles { display: none; }

  /* Shelf */
  .mv-shelf {
    box-shadow: none;
    border-width: 1px;
    border-color: #666;
  }

  .mv-bandeja {
    min-height: auto;
    padding: 2px 3px 0;
  }

  .mv-bandeja__label { width: 28px; font-size: 0.65em; padding-bottom: 2px; }
  .mv-bandeja__items { gap: 2px; padding-bottom: 2px; }

  .mv-divider { height: 3px; margin: 0 3px; }

  /* Product cards – very compact */
  .mv-product {
    width: 80px;
    padding: 2px;
    border: 1px solid #999;
    border-radius: 2px;
    background: #fff !important;
  }

  .mv-product:hover { box-shadow: none; transform: none; }

  .mv-product[data-promo="true"] {
    border-left: 2px solid #d97706;
    background: #fff !important;
  }

  .mv-product__img-wrap {
    height: 40px;
    background: #fff;
    margin-bottom: 1px;
  }

  .mv-product__img { max-height: 40px; }

  .mv-product__desc { font-size: 0.55em; max-height: 2.2em; margin-bottom: 1px; color: #000; }
  .mv-product__ean { font-size: 0.5em; color: #333; }
  .mv-product__details { font-size: 0.55em; color: #333; gap: 3px; }
  .mv-product__details strong { color: #000; }
  .mv-product__pos { font-size: 0.55em; padding: 0 2px; }
  .mv-badges { margin-top: 1px; }
  .mv-badge { font-size: 0.5em; padding: 0 2px; }
  .mv-product__no-img { font-size: 1.4em; }

  .mv-product__edit-btn { display: none !important; }

  /* Hide photo and modal */
  .mv-layout__photo { display: none !important; }
  .mv-layout { flex-direction: column; }
  .mv-modal { display: none !important; }
  .mv-price-ref { display: none !important; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */


.circle-logo {
    vertical-align: middle;
    width: 50px;
    height: 50px;
    border-radius: 50%;
}
