:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.settings-container {
  position: fixed;
  top: 92px;
  right: 20px;
  z-index: 10001;
}

.settings-button {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.settings-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.settings-button .material-icons {
  font-size: 22px;
}

.settings-panel {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(20, 20, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 20px;
  min-width: 220px;
  backdrop-filter: blur(15px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.settings-panel h3 {
  color: #ffffff;
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 500;
}

.setting-row {
  margin-bottom: 15px;
}

.setting-row label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.setting-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #64c8ff;
}

.setting-row select {
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 14px;
  margin-top: 5px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.setting-row select option {
  background: #1b2230;
  color: #f2f4f8;
}

.setting-row select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.setting-row select:focus {
  outline: none;
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}




.background-selector {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.bg-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bg-option:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
}

.bg-option.active {
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.3);
  transform: scale(1.1);
}.airtable-selectors-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  pointer-events: none;
  z-index: 100;
  box-sizing: border-box;
  touch-action: none;
}

/* Contenedor del árbol */
.tree-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: all;
  max-width: 400px;
  min-width: 300px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

/* Contenedor del árbol en columna derecha - más sutil y compacto */
.tree-container-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
  pointer-events: all;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  padding-right: 8px;
  box-sizing: border-box;
  background: transparent !important;
  backdrop-filter: none !important;
}

/* Hacer el árbol más compacto en la columna derecha */
.tree-container-right .tree-node {
  min-height: 28px;
  padding: 4px 0;
}

.tree-container-right .tree-label {
  font-size: 9px;
  margin-bottom: 1px;
}

.tree-container-right .tree-value {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 24px;
}

.tree-container-right .tree-input,
.tree-container-right .tree-select {
  font-size: 12px;
  padding: 4px 8px;
  min-height: 24px;
}

.tree-container-right .tree-toggle {
  width: 16px;
  height: 16px;
  min-width: 16px;
  font-size: 8px;
  margin-top: 4px;
  margin-right: 4px;
}

/* Scrollbar personalizado para el árbol */
.tree-container::-webkit-scrollbar {
  width: 8px;
}

.tree-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.tree-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Nodo del árbol */
.tree-node {
  display: flex;
  align-items: flex-start;
  position: relative;
  min-height: 32px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.tree-node-level-0 {
  cursor: pointer;
  padding: 2px 0;
}

.tree-node-level-0:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tree-node-level-1 {
  cursor: default;
}

.tree-node-level-1:hover {
  background: transparent;
}

.tree-node-collapsable {
  cursor: pointer;
}

.tree-node-collapsable:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Conectores visuales del árbol */
.tree-connector {
  width: 16px;
  min-width: 16px;
  position: relative;
  margin-top: 10px;
}

.tree-connector::before {
  content: '';
  position: absolute;
  left: 6px;
  top: -10px;
  width: 1.5px;
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
}

.tree-connector::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 0;
  width: 8px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.15);
}

/* Nivel 0: Piezas (sin indentación) */
.tree-node-level-0 {
  padding-left: 0;
}

.tree-node-level-0 .tree-connector {
  display: none;
}

/* Nivel 1: Especificaciones de piezas (indentadas) */
.tree-node-level-1 {
  padding-left: 20px;
}

/* Contenido del nodo */
.tree-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Wrapper del contenido con toggle */
.tree-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Botón para expandir/colapsar */
.tree-toggle {
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  color: white;
  font-size: 9px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.15s ease;
  margin-top: 6px;
  margin-right: 6px;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: auto;
}

.tree-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.tree-toggle:active {
  transform: scale(0.9);
}

/* Etiqueta del nodo */
.tree-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

/* Valor del nodo (para campos de solo lectura) */
.tree-value {
  font-size: 13px;
  color: white;
  font-weight: 300;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  min-height: 28px;
  display: flex;
  align-items: center;
}

.tree-placeholder {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
}

/* Inputs del árbol */
.tree-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  color: white;
  font-size: 13px;
  font-weight: 300;
  width: 100%;
  box-sizing: border-box;
}

.tree-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.tree-input:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.tree-input:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}

/* Selects del árbol */
.tree-select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  padding-right: 30px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  cursor: pointer;
  color: white;
  font-size: 13px;
  font-weight: 300;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='white' d='M5 7.5L1 2.5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px;
}

.tree-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.tree-select:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}

.tree-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.tree-select option {
  background-color: #1a1a1e;
  color: white;
  padding: 10px;
}

/* Quitar spinners del input number */
.tree-input[type="number"]::-webkit-inner-spin-button,
.tree-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.tree-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Estilos para piezas expandidas/colapsadas */
.tree-pieza-group {
  transition: all 0.15s ease;
}

/* Header de pieza */
.tree-pieza-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tree-pieza-nombre {
  flex: 1;
  font-size: 12px;
  cursor: default;
  user-select: none;
}

.tree-pieza-nombre.tree-pieza-activa {
  background: rgba(100, 200, 255, 0.15);
  border-color: #64c8ff;
  color: #64c8ff;
  font-weight: 400;
}

/* Pieza seleccionada */
.tree-pieza-seleccionada {
  position: relative;
}

.tree-pieza-seleccionada::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #64c8ff;
  border-radius: 1px;
}

/* Contenedor de dimensiones */
.tree-dimensiones {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 8px;
}

.tree-dimension-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 0;
}

.tree-dimension-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.tree-dimension-value {
  font-size: 12px;
  color: white;
  font-weight: 300;
}

/* Tabla de dimensiones */
.tree-dimension-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 11px;
}

.tree-dimension-th {
  text-align: left;
  padding: 4px 6px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
}

.tree-dimension-td {
  padding: 4px 6px;
  color: white;
  font-weight: 300;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 11px;
}

.tree-dimension-table tbody tr:last-child .tree-dimension-td {
  border-bottom: none;
}

.tree-dimension-warning {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  padding: 2px 0;
  text-align: center;
}

/* Contenedor de procesos */
.tree-procesos {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Layout para filas dentro de nodos (ID, etc.) */
.tree-node-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tree-node-row .tree-label {
  min-width: 120px;
  max-width: 180px;
}

.tree-id-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.02);
  padding: 8px;
  border-radius: 8px;
}

.tree-proceso-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-proceso-item .tree-select {
  flex: 1;
}

/* Botón para agregar proceso */
.tree-add-proceso {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.tree-add-proceso:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.tree-add-proceso:active {
  transform: scale(0.95);
}

/* Grupo de piezas */
.tree-pieza-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Header de pieza */
.tree-pieza-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tree-pieza-nombre {
  flex: 1;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.tree-pieza-nombre:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(2px);
}

.tree-pieza-nombre.tree-pieza-activa {
  background: rgba(100, 200, 255, 0.2);
  border-color: #64c8ff;
  color: #64c8ff;
  font-weight: 500;
}

/* Pieza seleccionada */
.tree-pieza-seleccionada {
  position: relative;
}

.tree-pieza-seleccionada::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #64c8ff;
  border-radius: 2px;
}

/* Contenedor del botón agregar pieza */
.tree-add-pieza-container {
  margin-bottom: 12px;
}

/* Botón para agregar pieza */
.tree-add-pieza {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 10px 20px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  color: white;
  font-size: 14px;
  font-weight: 300;
  cursor: pointer;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  width: 100%;
  box-sizing: border-box;
}

.tree-add-pieza:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.02);
}

.tree-add-pieza:active {
  transform: scale(0.98);
}

/* Botón para eliminar pieza */
.tree-remove-pieza {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 100, 100, 0.2);
  border: 1px solid rgba(255, 100, 100, 0.45);
  color: #ff6464;
  font-size: 18px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.tree-remove-pieza:hover {
  background: rgba(255, 100, 100, 0.3);
  border-color: rgba(255, 100, 100, 0.7);
  transform: scale(1.1);
}

.tree-remove-pieza:active {
  transform: scale(0.95);
}

/* DropZone */
.grid-row-2 {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.dropzone-cell {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-cell .drop-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-cell .drop-zone {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 300px;
  padding: 60px 80px;
}

/* Loading */
.airtable-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 20px 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-size: 16px;
  pointer-events: all;
}.capture-area-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  pointer-events: auto;
  cursor: crosshair;
}

.capture-instructions {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75);
  color: white;
  padding: 8px 16px;
  border-radius: 999px;
  text-align: left;
  z-index: 100001;
  pointer-events: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: unset;
  animation: captureSlideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.capture-instructions .material-icons {
  font-size: 18px;
  color: #64c8ff;
  opacity: 0.9;
}

.capture-instructions p {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #f8fafc;
  white-space: nowrap;
}

.capture-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.capture-hint {
  font-size: 11px !important;
  opacity: 0.5;
  font-weight: 400 !important;
  white-space: nowrap;
}

.capture-cancel-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.capture-cancel-btn .material-icons {
  font-size: 14px;
  color: inherit;
}

.capture-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.3);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  transform: scale(1.1);
}

@keyframes captureSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}



.capture-hint {
  font-size: 12px !important;
  opacity: 0.6;
  font-weight: 400 !important;
}

.capture-selection {
  position: fixed;
  border: 2px solid rgba(100, 200, 255, 0.85);
  background: rgba(100, 200, 255, 0.1);
  pointer-events: none;
  z-index: 10002;
  box-shadow: 0 0 20px rgba(100, 200, 255, 0.3);
}.client-search-container {
    position: relative;
    width: 100%;
    transition: transform 0.3s ease;
}

.client-search-container.is-highlighted {
    animation: client-pulse 2s infinite;
    z-index: 1001; /* Layer it above typical content */
}

.client-search-container.is-highlighted .client-search-input-wrapper {
    border-color: #fb923c;
    background: rgba(251, 146, 60, 0.1);
    box-shadow: 0 0 15px rgba(251, 146, 60, 0.4);
}

@keyframes client-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(251, 146, 60, 0.2);
    }
    100% {
        transform: scale(1);
    }
}

.client-search-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0 10px;
    height: 38px;
    transition: all 0.2s ease;
}

.client-search-input-wrapper:focus-within {
    border-color: #fb923c;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.2);
}

.client-search-input-wrapper.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.client-search-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    margin-right: 8px;
}

.client-search-input {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 0;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    min-width: 0;
    padding: 0;
}

.client-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.client-search-clear {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.client-search-clear:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.client-search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    z-index: 100;
    max-height: 320px;
    overflow-y: auto;
}

.client-search-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.client-search-item:last-child {
    border-bottom: none;
}

.client-search-item:hover {
    background: rgba(251, 146, 60, 0.15);
}

.client-item-info {
    flex: 1;
    min-width: 0;
}

.client-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-item-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-search-item.add-new {
    background: rgba(251, 146, 60, 0.05);
    color: #fb923c;
}

.client-search-item.add-new:hover {
    background: rgba(251, 146, 60, 0.2);
}

.add-icon {
    font-size: 18px;
}

.client-search-no-results {
    padding: 15px;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}/* src/components/Modal.css */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-content {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', sans-serif;
  color: #fff;
}

.modal-content.large {
  max-width: 1100px;
  height: 80vh;
  min-height: 750px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.modal-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #D9A21B;
}

.modal-icon {
  font-size: 1.5rem;
  color: #D9A21B;
}

form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

.form-group input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 0.75rem;
  color: #fff;
  outline: none;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.form-group input:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.form-group input:focus {
  background: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 0 2px rgba(100, 200, 255, 0.2);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-actions.right {
  margin-top: 1.5rem;
}

.btn-primary, .btn-secondary {
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.btn-primary {
  background: rgba(217, 162, 27, 0.9);
  color: #000;
  box-shadow: 0 4px 12px rgba(217, 162, 27, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: #f0b429;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 162, 27, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-message {
  color: #fca5a5;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.success-message {
  color: #86efac;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 0.75rem 1rem;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Tabs for TallerConfig */
.taller-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 0 1.5rem;
  gap: 1rem;
  margin-top: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  padding: 0.75rem 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: #fff;
}

.tab-btn.active {
  color: #D9A21B;
  border-bottom-color: #D9A21B;
}

.tab-content {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

.scrollable-content {
  height: 100%;
  flex: 1;
}

.tab-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

/* Fiscal tab */
.form-group.row {
  flex-direction: row;
  gap: 1.25rem;
}

.form-group.row .col, .form-group.triple .col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group.triple {
  flex-direction: row;
  gap: 1.25rem;
}

/* Logo tab */
.logo-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem 2rem;
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  transition: background 0.2s, border-color 0.2s;
}

.logo-upload-area:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.3);
}

.preview-logo-large {
  max-width: 200px;
  max-height: 200px;
  object-fit: contain;
  background: rgba(255,255,255,0.9);
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.logo-placeholder-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Maquinas Grid */
.maquinas-grid-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 600px) {
  .maquinas-grid-layout { grid-template-columns: 1fr; }
  .form-group.row, .form-group.triple { flex-direction: column; }
}

.mis-maquinas-seccion h3, .catalogo-maquinas-seccion h3 {
  font-size: 1.05rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}

.badge {
  background: rgba(217, 162, 27, 0.15);
  border: 1px solid rgba(217, 162, 27, 0.3);
  color: #D9A21B;
  padding: 0.1rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.maquinas-list, .catalogo-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.empty-state {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  font-style: italic;
  text-align: center;
  padding: 2rem 0;
}

.maquina-card, .catalogo-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.maquina-card:hover, .catalogo-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.2);
}

.catalogo-item {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.mq-info h4, .cat-name {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.mq-tipo, .cat-tipo {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.2rem;
  display: block;
}

.mq-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 0.85rem;
}

.price-input {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  transition: background 0.2s, border-color 0.2s;
}

.price-input:focus-within {
  background: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
}

.price-input .currency {
  color: rgba(255,255,255,0.6);
  margin-right: 0.25rem;
  font-weight: 500;
}

.price-input input {
  background: transparent;
  border: none;
  color: #fff;
  width: 70px;
  outline: none;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: textfield;
  font-weight: 500;
}

.price-input input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.price-input .suffix {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-left: 0.25rem;
}

.btn-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  color: rgba(239, 68, 68, 0.8);
  cursor: pointer;
  padding: 0.4rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-add {
  background: rgba(217, 162, 27, 0.15);
  color: #D9A21B;
  border: 1px solid rgba(217, 162, 27, 0.3);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add:hover {
  background: rgba(217, 162, 27, 0.25);
  border-color: rgba(217, 162, 27, 0.5);
  transform: translateY(-1px);
}

/* Custom Scrollbar - Consistent with QuotePanel */
.scrollable-content::-webkit-scrollbar,
.maquinas-list::-webkit-scrollbar,
.catalogo-list::-webkit-scrollbar,
.modal-content.tab-content::-webkit-scrollbar {
  width: 6px;
}
.scrollable-content::-webkit-scrollbar-track,
.maquinas-list::-webkit-scrollbar-track,
.catalogo-list::-webkit-scrollbar-track,
.modal-content.tab-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
.scrollable-content::-webkit-scrollbar-thumb,
.maquinas-list::-webkit-scrollbar-thumb,
.catalogo-list::-webkit-scrollbar-thumb,
.modal-content.tab-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
.scrollable-content::-webkit-scrollbar-thumb:hover,
.maquinas-list::-webkit-scrollbar-thumb:hover,
.catalogo-list::-webkit-scrollbar-thumb:hover,
.modal-content.tab-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* User Profile Modal Minimalist Styles */
.profile-modal-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-modal-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(217, 162, 27, 0.15);
  border: 2px solid rgba(217, 162, 27, 0.4);
  color: #D9A21B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(217, 162, 27, 0.15);
}

.profile-modal-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}

.profile-modal-email {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 1rem 0;
  font-weight: 400;
}

.profile-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: #4ade80;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.profile-modal-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-modal-body .form-group input {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.profile-modal-body .form-group input:focus {
  background: rgba(100, 200, 255, 0.05);
  border-color: #64c8ff;
  box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.2);
}

.inline-icon {
  color: rgba(255, 255, 255, 0.5);
  margin-right: 0.4rem;
  font-size: 1.1em;
  vertical-align: -0.15em;
}

.close-msg-btn {
  background: transparent;
  border: none;
  color: currentColor;
  opacity: 0.6;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.close-msg-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

/* Perfil del Taller Tab Styles */
.perfil-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
  min-height: 500px;
}

.perfil-col-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.perfil-col-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
}

.logo-section label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.logo-upload-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.2s;
}

.logo-upload-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(217, 162, 27, 0.4);
}

.preview-logo-med {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
  background: white;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.logo-placeholder-med {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.3);
}

.btn-upload-small {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(217, 162, 27, 0.15);
  color: #D9A21B;
  border: 1px solid rgba(217, 162, 27, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload-small:hover {
  background: rgba(217, 162, 27, 0.25);
  border-color: #D9A21B;
}

.perfil-form textarea {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  padding: 0.85rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  resize: none;
  transition: all 0.2s;
}

.perfil-form textarea:focus {
  border-color: #64c8ff;
  outline: none;
  background: rgba(100, 200, 255, 0.05);
}

@media (max-width: 850px) {
  .perfil-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .modal-content.large {
    min-height: auto;
    max-height: 95vh;
  }
}

/* Clientes Tab Evolution */
.clientes-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1rem;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  color: white;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.search-box input:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: #64c8ff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(100, 200, 255, 0.1);
}

.clientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.cliente-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cliente-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.card-status-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #D9A21B;
  opacity: 0.6;
}

.cliente-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.cliente-card-header h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.cliente-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-card-action {
  background: rgba(255, 255, 255, 0.08); /* Slightly lighter */
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff; /* Explicitly white */
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.btn-card-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-card-action.danger:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.cliente-card-body {
  flex: 1;
}

.info-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.info-label {
  color: rgba(255, 255, 255, 0.4);
}

.info-value {
  color: rgba(255, 255, 255, 0.8);
}

.info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.2s;
}

.info-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.info-badge.whatsapp {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.info-badge.whatsapp:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: #22c55e;
}

.cliente-card-footer {
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cliente Editor View */
.cliente-editor-view {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.editor-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn-back {
  background: transparent;
  border: none;
  color: #D9A21B;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  width: fit-content;
}

.btn-back:hover {
  text-decoration: underline;
}

.editor-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.editor-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.empty-state-large {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: rgba(255, 255, 255, 0.2);
  gap: 1rem;
}

.anim-fade-in {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.price-input input {
  background: transparent;
  border: none;
  color: #fff;
  width: 70px;
  outline: none;
  font-size: 0.95rem;
  -webkit-appearance: none;
  appearance: none;
  -moz-appearance: textfield;
  font-weight: 500;
}
/* Barra superior: estilo glass congruente con el resto de la app y compatible con cualquier fondo del visor */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: rgba(2, 48, 70, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 1000;
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.top-bar-content {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  height: 100%;
  min-height: 80px;
  box-sizing: border-box;
  width: 100%;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-self: start;
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

/* Addon izquierdo (ej. "Volver a cotización" + Dashboard) integrado en la barra */
.top-bar-left-addon {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 8px;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.top-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Ítem único de texto: alterna entre Visor y Dashboard al hacer clic */
.top-bar-toggle-dashboard-visor {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 24px;
}

.top-bar-toggle-dashboard-visor:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

/* Nombre del taller como enlace principal al dashboard */
.top-bar-taller-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 28px;
}

.top-bar-taller-name:hover {
  color: #fff;
  background: rgba(2, 48, 70, 0.85); /* Slightly darker focus */
  background: rgba(255, 255, 255, 0.08);
}

.top-bar-new-quote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #64c8ff;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
}

.top-bar-new-quote-btn:hover {
  background: rgba(100, 200, 255, 0.12);
  border-color: rgba(100, 200, 255, 0.4);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.top-bar-new-quote-btn:active {
  transform: translateY(0);
}

.top-bar-link-dashboard {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.top-bar-link-dashboard:hover {
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.08);
}

.top-bar-client-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  min-width: 200px;
}

.top-bar-client-label {
  font-size: 13px;
  font-weight: 500;
  color: #64c8ff;
  white-space: nowrap;
}

.top-bar-client-search-wrap .client-search-container {
  width: 280px;
}

.top-bar-client-search-wrap .client-search-input-wrapper {
  background: transparent;
  border: none;
  height: 32px;
  padding: 0;
  box-shadow: none;
}

.top-bar-client-search-wrap .client-search-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  box-shadow: none;
}

.top-bar-client-search-wrap .client-search-icon {
  color: #64c8ff;
  font-size: 18px;
  margin-right: 6px;
}

.top-bar-client-search-wrap .client-search-input {
  font-size: 13px;
  color: #f8fafc;
  font-weight: 500;
}

.top-bar-client-search-wrap .client-search-input::placeholder {
  color: rgba(100, 200, 255, 0.4);
}

.top-bar-controls-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  pointer-events: auto;
  width: auto;
  min-width: 400px;
}

.top-bar-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.top-bar-title-display {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  width: 100%;
  padding: 2px 8px;
  border-radius: 4px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.top-bar-dimensions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.top-bar-dimensions span {
  white-space: nowrap;
}

.top-bar-dimensions .dim-separator {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

.top-bar-weight {
  color: #64c8ff;
  font-weight: 600;
  margin-left: 4px;
}

/* Manual dimension form styles for TopBar */
.top-bar-manual-bbox-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

/* Container for geometry icon and dimensions */
.top-bar-dimensions-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

.top-bar-geometry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64c8ff;
  opacity: 0.9;
}

.top-bar-bbox-field {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-bbox-label {
  font-size: 10px;
  color: #64c8ff;
  font-weight: 700;
  text-transform: uppercase;
}

.top-bar-bbox-input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 12px;
  width: 35px;
  padding: 0;
  text-align: center;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}

.top-bar-bbox-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 10px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

/* Grupo Stock + tipo de geometría: separado del resto pero alineado */
.top-bar-stock-geo-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-right: 6px;
  padding-right: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.top-bar-item {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Solo icono, sin caja de botón; alineados y espaciados */
.viewer-control-button {
  background: none;
  border: none;
  border-radius: 0;
  padding: 8px;
  transition: color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 400;
  white-space: nowrap;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
}

.viewer-control-button:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.viewer-control-button:active {
  opacity: 0.85;
}

.viewer-control-button.active {
  color: rgba(100, 200, 255, 1);
}

.viewer-control-button .material-icons {
  font-size: 24px;
}

.viewer-control-button .viewer-control-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.viewer-control-button .viewer-control-icon svg {
  flex-shrink: 0;
  color: currentColor;
}

.viewer-control-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Control de posición del plano de corte (visible cuando hay vista de corte activa) */
.top-bar-section-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.top-bar-section-slider-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  flex-shrink: 0;
}

.top-bar-section-slider {
  width: 100px;
  min-width: 80px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  outline: none;
}

.top-bar-section-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(100, 200, 255, 0.95);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.top-bar-section-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(100, 200, 255, 0.95);
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.top-bar-section-slider:hover::-webkit-slider-thumb,
.top-bar-section-slider:focus::-webkit-slider-thumb {
  background: #64c8ff;
}

.top-bar-section-slider:hover::-moz-range-thumb,
.top-bar-section-slider:focus::-moz-range-thumb {
  background: #64c8ff;
}

.top-bar-button {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 10px 20px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  cursor: pointer;
  color: white;
  font-size: 13px;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.top-bar-button:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.top-bar-button:active {
  transform: translateY(0);
}

.top-bar-button .material-icons {
  font-size: 18px;
}

.top-bar-select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 10px 25px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  cursor: pointer;
  color: white;
  font-size: 13px;
  font-weight: 300;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  width: 100%;
  min-width: 150px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 10px;
  padding-right: 35px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.top-bar-select:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

.top-bar-select:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.15);
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}

.top-bar-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.top-bar-select option {
  background-color: #1a1a1e;
  color: white;
  padding: 10px;
}

/* Iconos de configuración: solo icono, mismo tamaño y alineación que los controles */
.top-bar-circle-button {
  background: none;
  border: none;
  border-radius: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  transition: color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  box-sizing: border-box;
}

.top-bar-circle-button:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.top-bar-circle-button:active {
  opacity: 0.85;
}

.top-bar-circle-button .material-icons {
  font-size: 24px;
}

/* Selector de taller como círculo */
.top-bar-item:has(.top-bar-select-circle) {
  position: relative;
  width: 36px;
  height: 36px;
}

.top-bar-select-circle {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  width: 180px;
  height: 100%;
  min-width: 180px;
  cursor: pointer;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0;
}

.top-bar-select-circle option {
  background: #1b2230;
  color: #f2f4f8;
  font-size: 13px;
}

.top-bar-circle-display {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  pointer-events: none;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.top-bar-circle-display .material-icons {
  font-size: 20px;
}

.top-bar-item:has(.top-bar-select-circle:hover) .top-bar-circle-display,
.top-bar-item:has(.top-bar-select-circle:focus) .top-bar-circle-display {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* View Toggle Switch */
.view-toggle-wrap {
  display: flex;
  align-items: center;
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
}

.view-toggle-switch {
  position: relative;
  display: inline-flex;
  width: 64px;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.view-toggle-switch:hover {
  background: rgba(255, 255, 255, 0.15);
}

.view-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.view-toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  border-radius: 16px;
}

.view-toggle-slider::before {
  content: '';
  position: absolute;
  height: 26px;
  width: 26px;
  left: 2px;
  bottom: 2px;
  background: rgba(100, 200, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  transition: .3s cubic-bezier(0.4, 0.0, 0.2, 1);
  z-index: 1;
}

.view-toggle-switch input:checked+.view-toggle-slider::before {
  transform: translateX(32px);
  background: rgba(130, 220, 150, 0.9);
}

.view-toggle-icon {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
  transition: color 0.3s;
  user-select: none;
}

.view-toggle-switch input:not(:checked)+.view-toggle-slider .view-toggle-icon:first-child {
  color: #fff;
}

.view-toggle-switch input:checked+.view-toggle-slider .view-toggle-icon:last-child {
  color: #111;
}

.view-toggle-switch input:checked+.view-toggle-slider .view-toggle-icon:first-child {
  color: rgba(255, 255, 255, 0.4);
}

.top-bar-circle-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.top-bar-circle-button:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.top-bar-circle-button .material-icons {
  font-size: 24px;
}

/* User Profile Button and Dropdown */
.top-bar-profile-container {
  position: relative;
}

.top-bar-profile-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D9A21B;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.top-bar-profile-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  color: #f0b429;
}

.top-bar-profile-dropdown {
  position: absolute;
  top: 55px;
  right: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  width: 220px;
  padding: 8px 0;
  box-shadow: 0 15px 40px -5px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.profile-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
  text-align: center;
}

.profile-dropdown-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  word-break: break-all;
  font-weight: 500;
}

.profile-dropdown-item {
  background: transparent;
  border: none;
  text-align: left;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #f8fafc;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, padding-left 0.2s;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  padding-left: 22px;
}

.profile-dropdown-item.logout {
  color: #fca5a5;
  margin-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

/* New View Toggle Switcher */
.top-bar-view-toggle {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: 10px;
  height: 38px;
  gap: 2px;
  margin-left: 8px;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.view-toggle-btn:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
}

.view-toggle-btn.active {
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.2) 0%, rgba(100, 200, 255, 0.1) 100%);
  color: #64c8ff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(100, 200, 255, 0.3);
}

.view-toggle-btn svg {
  transition: transform 0.25s ease;
}

.view-toggle-btn.active svg {
  filter: drop-shadow(0 0 4px rgba(100, 200, 255, 0.5));
  transform: scale(1.1);
}.model-carousel-container {
  position: fixed;
  /* Colocar justo debajo de la barra superior (80px) con un pequeño margen para evitar solapamientos */
  top: calc(80px + 12px);
  /* Alinear con la columna del árbol (padding en .airtable-selectors-container es 20px) */
  left: 20px;
  /* Ajustar ancho para que coincida con la columna del árbol (max 400px, min 300px) */
  width: 400px;
  max-width: calc(100% - 40px);
  min-width: 300px;
  height: 140px;
  background: transparent;
  border: none;
  z-index: 1100;
  backdrop-filter: none;
  overflow: visible;
  pointer-events: auto;
  /* El carrusel ahora recibe eventos */
}

/* Flechas removidas: se usa la barra de scroll nativa */

.model-carousel {
  /* Hacer el contenedor scrollable y centrar visualmente su contenido cuando este es más pequeño
     Usamos text-align:center + un wrapper inline-flex para que cuando el contenido ocupe menos que el ancho
     del carrusel se muestre centrado; cuando excede, el contenido desborda y se puede scrollear normalmente. */
  display: block;
  text-align: center;
  padding: 12px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  background: transparent;
  pointer-events: auto;
  /* Los elementos del carrusel sí reciben eventos */
}

.model-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.model-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.model-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.model-carousel-inner {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  height: 100%;
}

/* Scrollbar is hidden intentionally to avoid redundancy with the carousel arrows */
/* (No visible track/thumb) */

.thumbnail-item {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Botón de eliminar en la esquina superior derecha de la tarjeta */
.carousel-item-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 400;
  cursor: pointer;
  z-index: 20;
  padding: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.carousel-item-info-btn {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 20;
  padding: 0;
  transition: all 0.2s ease;
  line-height: 1;
}

.carousel-item-info-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.95);
}

.carousel-item-info-btn:active {
  transform: scale(0.95);
}

.carousel-item-delete-btn:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.carousel-item-delete-btn:active {
  transform: scale(0.95);
}

/* Tarjetas arrastrables: eliminar pieza soltando fuera del área de cotización (a la derecha) */
.carousel-item-draggable {
  cursor: grab;
}

.carousel-item-draggable:active {
  cursor: grabbing;
}

.carousel-item-dragging {
  opacity: 0.7;
  cursor: grabbing;
}

/* Estilo para el item de agregar pieza */
.thumbnail-add {
  background: transparent;
}

.thumbnail-add .thumbnail-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  width: 120px;
  height: 120px;
}

.thumbnail-add-icon {
  font-size: 34px;
  color: rgba(255, 255, 255, 0.85);
}

.thumbnail-add .thumbnail-label {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
}

.thumbnail-manual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  width: 100%;
  height: 100%;
  min-height: 80px;
  cursor: pointer;
}

.thumbnail-manual-icon {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.4);
}

.carousel-item-manual .thumbnail-image {
  border-radius: 8px;
  object-fit: contain;
  width: 100%;
  height: 100%;
  background: transparent;
}

.thumbnail-item:hover {
  transform: translateY(-4px);
}

.thumbnail-item.selected {
  transform: translateY(-4px) scale(1.1);
}


.thumbnail-canvas {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Asegurar que el zoom no se salga del contenedor */
  clip-path: inset(0);
}

/* Cuando NO hay miniatura: cuadro blanco con icono de cámara centrado */
.thumbnail-empty {
  width: 100%;
  height: 100%;
  background: #ffffff;
  /* cuadro blanco */
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.thumbnail-camera-center {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  /* icon-only */
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  z-index: 15;
  transition: transform 0.12s ease, opacity 0.12s ease;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.thumbnail-camera-center:hover {
  transform: scale(1.12);
  opacity: 1;
}

.thumbnail-item.selected .thumbnail-canvas {
  /* Indicador de selección sutil sin sombra pesada */
  outline: 2px solid rgba(100, 200, 255, 0.5);
}

.thumbnail-camera-btn {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  /* icon-only */
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, opacity 0.12s ease;
  z-index: 20;
  padding: 0;
  line-height: 1;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.thumbnail-camera-btn:hover {
  opacity: 1;
  transform: scale(1.12);
}

.thumbnail-camera-btn:active {
  transform: scale(0.96);
}



.thumbnail-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: all 0.3s ease;
  /* Asegurar que la imagen se escale para caber completamente en la miniatura */
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  max-width: 120px;
  max-height: 120px;
}

.thumbnail-image.selected {
  filter: brightness(1.2) saturate(1.3);
}

.thumbnail-error {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
}

/* Modal de datos de pieza */
.piece-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.piece-info-modal {
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  width: 90%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.piece-info-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.piece-info-modal-header h3 {
  margin: 0;
  color: white;
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.piece-info-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.piece-info-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.piece-info-modal-content {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}

.piece-info-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.piece-info-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 90px;
}

.piece-info-value {
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 400;
}

.piece-info-empty {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.thumbnail-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 400;
  transition: color 0.3s ease;
}

.thumbnail-item.selected .thumbnail-label {
  color: #64c8ff;
  font-weight: 500;
}

.thumbnail-loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.thumbnail-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #64c8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== ESTILOS PARA CARRUSEL VERTICAL ===== */

.model-carousel-container-vertical {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.model-carousel-vertical {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.model-carousel-vertical::-webkit-scrollbar {
  width: 6px;
}

.model-carousel-vertical::-webkit-scrollbar-track {
  background: transparent;
}

.model-carousel-vertical::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.model-carousel-vertical::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.model-carousel-inner-vertical {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
}

.carousel-item-vertical {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  min-height: 100px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-item-vertical:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.carousel-item-vertical.selected {
  background: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 16px rgba(100, 200, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal de configuración de proceso abierto: no permitir cambiar de pieza */
.carousel-item-vertical.carousel-item-switch-disabled {
  cursor: not-allowed;
  pointer-events: auto;
}

.carousel-item-vertical.carousel-item-switch-disabled:hover {
  background: inherit;
  border-color: inherit;
}

.carousel-item-vertical.multi-selected {
  border-color: rgba(100, 200, 255, 0.5);
  box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.25);
}

/* Barra de selección múltiple: lógica activa para estado por pieza; solo oculta en pantalla */
.carousel-selection-bar {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 20px 10px;
  flex-wrap: wrap;
}

.carousel-selection-link {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: none;
  font-family: inherit;
  transition: color 0.2s ease;
}

.carousel-selection-link:hover {
  color: #64c8ff;
}

.carousel-selection-sep {
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  user-select: none;
}

.carousel-selection-count {
  font-size: 11px;
  color: rgba(100, 200, 255, 0.9);
  margin-left: 4px;
}

/* Checkbox de selección: lógica activa para estado por pieza; solo oculto en pantalla */
.carousel-item-checkbox-wrap {
  display: none;
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 0;
  cursor: default;
  pointer-events: auto;
}

.carousel-item-checkbox {
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  accent-color: #64c8ff;
  opacity: 0.6;
}

.carousel-item-checkbox:hover {
  opacity: 0.9;
}

.carousel-item-checkbox:checked {
  opacity: 1;
}

.carousel-thumbnail-wrapper {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
}

.thumbnail-canvas-vertical {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Campo de cantidad: compacto, solo número centrado sin recuadro */
.carousel-quantity-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  min-width: 40px;
}

.carousel-quantity-label {
  display: none;
}

.carousel-quantity-input {
  width: 100%;
  min-width: 1.2em;
  max-width: 2.5em;
  height: auto;
  min-height: 0;
  background: transparent;
  border: none;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: white;
  font-family: inherit;
  transition: color 0.2s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
}

.carousel-quantity-input:hover {
  color: rgba(255, 255, 255, 0.95);
}

.carousel-quantity-input:focus {
  outline: none;
  color: #64c8ff;
}

.carousel-quantity-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-size: 18px;
}

.carousel-quantity-input[type="number"]::-webkit-inner-spin-button,
.carousel-quantity-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.carousel-quantity-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Descripción / concepto: más espacio al ser cantidad compacta */
.carousel-concept-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 12px;
}

.carousel-quote-concept {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.carousel-concept-name-input {
  width: 100%;
  background: transparent;
  color: #64c8ff;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  resize: none;
  padding: 4px;
  margin-left: -4px;
  margin-bottom: 2px;
  transition: all 0.2s ease;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  display: block;
}

.carousel-concept-name-input:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.carousel-concept-name-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.2);
  border-color: #64c8ff;
}

.carousel-concept-line-input {
  width: 100%;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  resize: none;
  padding: 4px;
  margin-left: -4px;
  transition: all 0.2s ease;
  overflow-y: auto;
  scrollbar-width: none;
}

.carousel-concept-line-input:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.carousel-concept-line-input:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.2);
  border-color: #64c8ff;
}

.carousel-concept-line:nth-child(2) {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

/* Estilos para el precio unitario */
.carousel-price-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  align-items: stretch;
}

.carousel-price-label {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  text-align: left;
  line-height: 1.2;
}

.carousel-item-vertical.selected .thumbnail-canvas-vertical {
  /* Indicador de selección sutil */
  outline: 2px solid rgba(100, 200, 255, 0.5);
}

.carousel-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-right: 8px;
}

.carousel-info-row-price {
  justify-content: space-between;
}

.carousel-info-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.carousel-info-label {
  font-size: 9px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.2px;
  min-width: 55px;
  flex-shrink: 0;
}

.carousel-info-row-price .carousel-info-label {
  min-width: auto;
}

.carousel-info-value {
  font-size: 11px;
  color: white;
  font-weight: 300;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-info-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  padding: 4px 8px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  color: white;
  font-size: 11px;
  font-weight: 300;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  min-width: 0;
  width: 100%;
}

.carousel-info-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.carousel-info-input:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.carousel-info-input:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}

.carousel-info-input[type="number"]::-webkit-inner-spin-button,
.carousel-info-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.carousel-info-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Wrapper para el campo de precio con símbolo $ */
.carousel-price-wrapper {
  position: relative;
  flex: 1;
  width: 100%;
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-price-symbol {
  position: absolute;
  left: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
}

.carousel-price-input {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;
  padding: 0;
  padding-left: 16px !important;
  text-align: center;
  font-size: 32px;
  font-weight: 600;
  color: white;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  overflow: hidden;
}

.carousel-price-input:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.carousel-price-input:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.2);
}

.carousel-price-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-size: 20px;
}

.carousel-price-input[type="number"]::-webkit-inner-spin-button,
.carousel-price-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.carousel-price-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.carousel-item-vertical.compact {
  padding: 8px;
  min-height: auto;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.carousel-item-vertical.compact:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(0) scale(1.05);
  box-shadow: none;
}

.carousel-item-vertical.compact.selected {
  background: transparent;
  border: none;
  box-shadow: none;
}

.carousel-item-vertical.compact .carousel-quantity-wrapper,
.carousel-item-vertical.compact .carousel-concept-wrapper,
.carousel-item-vertical.compact .carousel-price-section,
.carousel-item-vertical.compact .carousel-item-delete-btn,
.carousel-item-vertical.compact .carousel-item-info-btn {
  display: none;
}

.carousel-item-vertical.compact .carousel-thumbnail-wrapper,
.carousel-item-vertical.compact .thumbnail-canvas-vertical {
  width: 84px;
  height: 84px;
}

.carousel-item-vertical.compact.carousel-item-add {
  background: transparent;
  border: none;
}

.carousel-item-vertical.compact.carousel-item-add .carousel-item-info {
  display: none;
}

/* Cliente como primera miniatura en modo compacto: mismo tamaño y alineación que las piezas */
.carousel-item-vertical.compact.carousel-item-client {
  padding: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  /* Mismo tamaño que una miniatura compacta: solo el cuadro 84x84 */
  min-height: auto;
  justify-content: center;
  align-items: center;
}

.carousel-item-vertical.compact.carousel-item-client:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(0) scale(1.05);
  box-shadow: none;
}

/* En compacto, cliente usa las mismas dimensiones que las miniaturas de piezas */
.carousel-item-vertical.compact.carousel-item-client .carousel-thumbnail-wrapper,
.carousel-item-vertical.compact.carousel-item-client .thumbnail-canvas-vertical {
  width: 84px;
  height: 84px;
}

.carousel-item-client .carousel-item-client-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: inherit;
  font: inherit;
  color: inherit;
}

.carousel-item-client .thumbnail-canvas-vertical {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.carousel-item-client .carousel-client-initials {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.95);
  user-select: none;
}

/* Subtotal en las tarjetas */
.carousel-subtotal-value {
  flex: 1;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  text-align: right;
}

.carousel-item-add {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.25);
  justify-content: center;
  align-items: center;
}

.carousel-item-add:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.4);
}

.carousel-item-add .thumbnail-canvas-vertical {
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item-add .carousel-item-info {
  justify-content: center;
}

/* Ajustar tamaño de imagen en layout vertical */
.carousel-item-vertical .thumbnail-image {
  max-width: 96px;
  max-height: 96px;
}

.carousel-item-vertical .thumbnail-empty {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Estados de procesamiento */
.carousel-item-vertical.processing {
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}

.carousel-item-vertical.processing .carousel-item-info {
  opacity: 0.5;
}

.carousel-item-vertical.error {
  border: 2px solid rgba(255, 100, 100, 0.5);
  background: rgba(255, 100, 100, 0.1);
}

.thumbnail-processing {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(100, 200, 255, 0.1);
  border-radius: 8px;
  gap: 8px;
}

.processing-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(100, 200, 255, 0.3);
  border-top-color: #64c8ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.processing-text {
  font-size: 11px;
  color: #64c8ff;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.thumbnail-error {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 100, 100, 0.1);
  border-radius: 8px;
  gap: 4px;
}

.error-icon {
  font-size: 24px;
}

.error-text {
  font-size: 11px;
  color: rgba(255, 100, 100, 0.9);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}.general-config-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.general-config-modal {
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.general-config-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.general-config-modal-header h2 {
  margin: 0;
  color: white;
  font-size: 20px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.general-config-modal-close {
  background: transparent;
  border: none;
  color: white;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.general-config-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

.general-config-modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.general-config-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.general-config-fields {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.general-config-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.general-config-field label {
  color: white;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.general-config-field input {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
  color: white;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  transition: all 0.2s ease;
}

.general-config-field input:focus {
  outline: none;
  border-color: rgba(100, 200, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.1);
}

.general-config-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.config-taller-logo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.config-taller-logo-preview {
  width: 80px;
  height: 44px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.config-taller-logo-placeholder {
  width: 80px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.general-config-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  gap: 12px;
}

.general-config-button-group {
  display: flex;
  gap: 12px;
}

.general-config-button {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.general-config-button.save {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.4);
  color: #64c8ff;
}

.general-config-button.save:hover:not(:disabled) {
  background: rgba(100, 200, 255, 0.25);
  border-color: rgba(100, 200, 255, 0.6);
  transform: scale(1.05);
}

.general-config-button.save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.general-config-button.cancel {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.general-config-button.cancel:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.general-config-button.reset {
  background: rgba(255, 100, 100, 0.15);
  border-color: rgba(255, 100, 100, 0.4);
  color: #ff6464;
}

.general-config-button.reset:hover {
  background: rgba(255, 100, 100, 0.25);
  border-color: rgba(255, 100, 100, 0.6);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.add-piece-menu-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.add-piece-menu {
  background: var(--app-bg, #1e293b);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.add-piece-menu-option {
  display: block;
  width: 100%;
  padding: 10px 20px;
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
}

.add-piece-menu-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}
.manual-piece-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.manual-piece-modal {
  background: var(--app-bg, #1e293b);
  border-radius: 12px;
  min-width: 320px;
  max-width: 420px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.manual-piece-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manual-piece-modal-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #f1f5f9;
}

.manual-piece-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.manual-piece-modal-close:hover {
  color: #f1f5f9;
}

.manual-piece-modal-content {
  padding: 20px;
}

.manual-piece-modal-field {
  margin-bottom: 16px;
}

.manual-piece-modal-field label {
  display: block;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 6px;
}

.manual-piece-modal-field input[type="text"],
.manual-piece-modal-field input[type="number"],
.manual-piece-modal-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.8);
  color: #f1f5f9;
  font-size: 0.9375rem;
}

.manual-piece-modal-field textarea {
  resize: vertical;
  min-height: 72px;
}

.manual-piece-modal-photo-btn {
  padding: 8px 14px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 8px;
  color: #93c5fd;
  font-size: 0.875rem;
  cursor: pointer;
}

.manual-piece-modal-photo-btn:hover {
  background: rgba(59, 130, 246, 0.3);
}

.manual-piece-modal-photo-preview {
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  max-width: 120px;
  max-height: 120px;
}

.manual-piece-modal-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manual-piece-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.manual-piece-modal-cancel {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.875rem;
  cursor: pointer;
}

.manual-piece-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.manual-piece-modal-create {
  padding: 8px 16px;
  background: #3b82f6;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}

.manual-piece-modal-create:hover:not(:disabled) {
  background: #2563eb;
}

.manual-piece-modal-create:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
/* Fondo transparente: se ve el degradado del visor detrás */
.manual-photo-viewer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  background: transparent;
}

.manual-photo-viewer:active {
  cursor: grabbing;
}

.manual-photo-viewer--dragging {
  cursor: grabbing;
}

.manual-photo-viewer--empty {
  cursor: default;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
  font-weight: 300;
}

/* Contenedor de la imagen: ocupa todo el visor para encuadrar la foto */
.manual-photo-viewer__inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform;
}

/* Imagen encuadrada en pantalla (contain) y centrada */
.manual-photo-viewer__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  background: #ffffff;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.pdf-status-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  z-index: 5;
  backdrop-filter: blur(4px);
  font-size: 14px;
}

.pdf-status-overlay.error {
  color: #ef4444;
}



.photo-viewer-reset-btn {
  position: absolute;
  top: 76px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2000;
}

.photo-viewer-reset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.manual-photo-viewer--disabled {
  cursor: default !important;
}/* Controles de bounding box: solo iconos, alineados con la barra superior */
.bounding-box-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  pointer-events: none;
}

.bounding-box-controls .bounding-box-button {
  pointer-events: all;
}

.bounding-box-button {
  background: none;
  border: none;
  border-radius: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  color: rgba(255, 255, 255, 0.9);
  box-sizing: border-box;
}

.bounding-box-button:hover:not(:disabled) {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.bounding-box-button:active:not(:disabled) {
  opacity: 0.85;
}

.bounding-box-button.active {
  color: rgba(100, 200, 255, 1);
}

.bounding-box-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.bounding-box-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
}

.bounding-box-icon svg {
  flex-shrink: 0;
  color: currentColor;
}

.axis-separator {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 2px;
  pointer-events: none;
}

/* ─── Dimension Input Form for Manual Stock Entry ─── */
.bbox-dim-form {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: all;
}

.bbox-dim-field {
  display: flex;
  align-items: center;
  gap: 3px;
}

.bbox-dim-label {
  color: rgba(100, 200, 255, 0.85);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  user-select: none;
  min-width: 12px;
  text-align: center;
}

.bbox-dim-input {
  width: 42px;
  height: 24px;
  padding: 2px 5px;
  border: 1px solid rgba(100, 200, 255, 0.3);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-family: 'Inter', 'Roboto', sans-serif;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bbox-dim-input:focus {
  border-color: rgba(100, 200, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(100, 200, 255, 0.15);
}

.bbox-dim-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}/* Desplegable Stock en la barra superior: solo texto con la primera opción sugerida */
.stock-dropdown-wrap {
  position: relative;
}

.stock-dropdown-trigger {
  background: none;
  border: none;
  border-radius: 0;
  padding: 8px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  box-sizing: border-box;
  min-height: 40px;
  text-align: left;
}

.stock-dropdown-trigger:hover:not(:disabled) {
  color: rgba(255, 255, 255, 1);
}

.stock-dropdown-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stock-dropdown-trigger-text {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

.stock-dropdown-trigger:hover:not(:disabled) .stock-dropdown-trigger-text {
  text-decoration-color: rgba(255, 255, 255, 0.8);
}

.stock-dropdown-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-width: 280px;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(2, 48, 70, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 8px;
  z-index: 1001;
}

.stock-dropdown-group {
  margin-bottom: 4px;
}

.stock-dropdown-group:last-child {
  margin-bottom: 0;
}

.stock-dropdown-group-title {
  display: block;
  width: 100%;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
  margin-bottom: 4px;
}

.stock-dropdown-group-title:hover,
.stock-dropdown-group-title.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.stock-dropdown-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 4px;
  margin-top: 4px;
}

.stock-dropdown-option {
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.stock-dropdown-option:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.stock-dropdown-option.selected {
  background: rgba(100, 200, 255, 0.25);
  border-color: #64c8ff;
}

.stock-dropdown-empty {
  padding: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}
.view-compass-container {
    position: relative;
    z-index: 9999;
    user-select: none;
    pointer-events: none;
}

.view-compass-outer {
    position: relative;
    width: 120px;
    height: 120px;
    pointer-events: auto;
    border-radius: 50%;
    /* Mismo color que la barra superior */
    background: rgba(2, 48, 70, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.6px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
}

.view-compass-outer:hover {
    border-color: rgba(251, 146, 60, 0.4);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(251, 146, 60, 0.1);
}

.view-compass-label {
    position: absolute;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.view-compass-label:hover {
    color: #fb923c;
    text-shadow: 0 0 8px rgba(251, 146, 60, 0.4);
    transform: scale(1.15);
}

.view-compass-label.top {
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.view-compass-label.left {
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.view-compass-label.right {
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.view-compass-label.front {
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
}

.view-compass-center {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 3;
    padding: 0;
}

.view-compass-center:hover {
    background: rgba(251, 146, 60, 0.1);
    border-color: #fb923c;
    transform: rotate(45deg) scale(1.1);
    box-shadow: 0 0 20px rgba(251, 146, 60, 0.3);
}

.view-compass-center svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.center-needle-alt {
    color: #fb923c;
    display: flex;
    align-items: center;
    justify-content: center;
}

.center-needle-alt .material-icons {
    font-size: 24px;
}

.view-compass-label .material-icons {
    font-size: 22px;
}

/* Resaltado especial para navegación */
.mode-pdf .view-compass-label.left,
.mode-pdf .view-compass-label.right {
    color: rgba(251, 146, 60, 0.8);
}

.mode-pdf .view-compass-label.left:hover,
.mode-pdf .view-compass-label.right:hover {
    color: #fb923c;
}.left-column-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: transparent !important;
  backdrop-filter: none !important;
}

/* Botón expandir/colapsar: solo icono, sin marco ni círculo (igual que barra superior) */
.left-column-sidebar-toggle {
  position: absolute;
  top: 12px;
  right: 10px;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: none;
  border-radius: 0;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  z-index: 30;
  transition: color 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
  box-sizing: border-box;
}

.left-column-sidebar-toggle:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.left-column-sidebar-toggle:active {
  opacity: 0.85;
}

.left-column-sidebar-toggle.active {
  color: #64c8ff;
}

.left-column-sidebar-toggle.active:hover {
  color: #64c8ff;
  opacity: 1;
}

.left-column-sidebar-toggle svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* Resize: a la derecha del botón toggle (solo en modo extendido) */
.left-column-resize-handle {
  position: absolute;
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  z-index: 20;
  background: transparent;
  transition: background 0.2s ease;
}

.left-column-resize-handle:hover {
  background: rgba(100, 200, 255, 0.1);
}

.left-column-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 3px;
  height: 60px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.left-column-resize-handle:hover::after {
  background: #64c8ff;
  height: 70px;
  width: 4px;
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.5);
}

.left-column-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
  padding: 20px 25px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.left-column-content::-webkit-scrollbar {
  width: 6px;
}

.left-column-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.left-column-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.left-column-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.left-column-header {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
}

.left-column-header-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.left-column-header-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.5);
}

.left-column-header-value {
  font-size: 13px;
  font-weight: 300;
  color: white;
  min-height: 18px;
  padding: 6px 10px;
  background: transparent !important;
  border-radius: 0;
}

.left-column-header-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  padding-right: 30px;
  color: white;
  font-size: 13px;
  font-weight: 300;
  min-height: 28px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='white' d='M5 7.5L1 2.5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 8px;
}

.left-column-header-select:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

.left-column-header-select:focus {
  outline: none;
  background-color: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
}

.left-column-header-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.left-column-header-select option {
  background-color: #1a1a1e;
  color: white;
  padding: 10px;
}

.left-column-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.left-column-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.left-column-option-button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.left-column-option-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.left-column-option-button.active {
  background: rgba(100, 200, 255, 0.2);
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.35);
}

.left-column-empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.left-column-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}

.left-column-value {
  color: white;
  font-size: 13px;
  font-weight: 300;
  padding: 6px 10px;
  background: transparent !important;
  border-radius: 0;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
}

.status-draft, .status-borrador {
  background: rgba(100, 200, 255, 0.15);
  color: #64c8ff;
  border: 1px solid rgba(100, 200, 255, 0.3);
}

.status-sent {
  background: rgba(180, 100, 255, 0.15);
  color: #b464ff;
  border: 1px solid rgba(180, 100, 255, 0.3);
}

.status-accepted {
  background: rgba(100, 255, 150, 0.15);
  color: #64ff96;
  border: 1px solid rgba(100, 255, 150, 0.3);
}

.status-rejected {
  background: rgba(255, 100, 100, 0.15);
  color: #ff6464;
  border: 1px solid rgba(255, 100, 100, 0.3);
}

.status-cancelled {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-expired {
  background: rgba(255, 150, 100, 0.15);
  color: #ff9664;
  border: 1px solid rgba(255, 150, 100, 0.3);
}

.status-printed {
  background: rgba(100, 100, 255, 0.15);
  color: #6464ff;
  border: 1px solid rgba(100, 100, 255, 0.3);
}

.left-column-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.left-column-section-title {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

/* Condiciones de entrega: 4 bloques alineados horizontalmente, aspecto de cuadro/botón */
.left-column-section-condiciones {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.left-column-condiciones-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.left-column-condiciones-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  min-height: 0;
}

.left-column-condiciones-block-label {
  font-size: 9px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* Contenedor del desplegable custom (trigger + panel) */
.left-column-condiciones-dropdown-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Trigger: mismo aspecto que cuadro de texto / botón informativo */
.left-column-condiciones-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.left-column-condiciones-select:hover {
  background-color: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.22);
}

.left-column-condiciones-select:focus,
.left-column-condiciones-select.open {
  outline: none;
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(100, 200, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(100, 200, 255, 0.15);
}

.left-column-condiciones-select-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.left-column-condiciones-select-arrow {
  flex-shrink: 0;
  font-size: 9px;
  opacity: 0.6;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}

.left-column-condiciones-select.open .left-column-condiciones-select-arrow {
  transform: rotate(180deg);
}

/* Panel desplegable: misma estética que la app (columna izquierda) */
.left-column-condiciones-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  background: rgba(26, 28, 32, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  padding: 6px 0;
}

.left-column-condiciones-dropdown-panel::-webkit-scrollbar {
  width: 6px;
}

.left-column-condiciones-dropdown-panel::-webkit-scrollbar-track {
  background: transparent;
}

.left-column-condiciones-dropdown-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.left-column-condiciones-dropdown-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.left-column-condiciones-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.left-column-condiciones-dropdown-item.selected {
  background: rgba(100, 200, 255, 0.15);
  color: #64c8ff;
}

.left-column-condiciones-dropdown-item.empty {
  color: rgba(255, 255, 255, 0.45);
  cursor: default;
}

.left-column-condiciones-label {
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.left-column-condiciones-btn {
  min-width: 0;
  flex: 1 1 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: white;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.left-column-condiciones-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
}

.left-column-condiciones-btn.active {
  background: rgba(100, 200, 255, 0.2);
  border-color: rgba(100, 200, 255, 0.6);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.35);
}

.left-column-condiciones-empty {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.left-column-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  background: transparent !important;
}

.left-column-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
}

.left-column-total-label {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

.left-column-total-value {
  color: white;
  font-weight: 500;
}

.left-column-total-override {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.left-column-total-input {
  width: 120px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 12px;
  text-align: right;
  font-family: inherit;
}

.left-column-total-input[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.left-column-total-input:focus {
  outline: none;
  background: rgba(100, 200, 255, 0.12);
  border-color: #64c8ff;
}

.left-column-total-grand {
  padding-top: 12px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  margin-top: 4px;
}

.left-column-total-grand .left-column-total-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.left-column-total-grand-value {
  font-size: 18px;
  font-weight: 700;
  color: #64c8ff;
}

.left-column-actions {
  padding: 12px 20px;
  border-top: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-shrink: 0;
}

.left-column-action-button {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.left-column-button-save {
  background: rgba(100, 200, 255, 0.2);
  color: #64c8ff;
  border: 1px solid rgba(100, 200, 255, 0.3);
}

.left-column-button-save:hover {
  background: rgba(100, 200, 255, 0.3);
  border-color: rgba(100, 200, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 200, 255, 0.2);
}

.left-column-button-save:active {
  transform: translateY(0);
}

.left-column-button-save.is-dirty {
  background: rgba(100, 200, 255, 0.3);
  border-color: #64c8ff;
}

.left-column-button-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.dirty-dot {
  color: #64c8ff;
  font-size: 8px;
  margin-left: 6px;
  animation: pulse-dirty 2s infinite;
}

@keyframes pulse-dirty {
  0% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
  100% { opacity: 0.6; transform: scale(0.9); }
}

.left-column-button-download {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.left-column-button-download:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.left-column-button-download:active {
  transform: translateY(0);
}

.left-column-carousel-wrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

.left-column-carousel-wrapper .model-carousel-container-vertical {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  min-width: auto !important;
}

/* Tarjeta de Envío foráneo (mismo formato que piezas, al final del listado) */
.left-column-envio-foraneo-wrap {
  width: 100%;
  padding: 0 0 8px;
  margin-top: 4px;
}

.left-column-envio-foraneo-wrap .envio-foraneo-container {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  min-width: auto !important;
}

.left-column-envio-foraneo-wrap .envio-foraneo-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
}

.left-column-envio-foraneo-wrap .envio-foraneo-thumb .material-icons,
.left-column-envio-foraneo-wrap .envio-foraneo-thumb svg {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.7);
}

.left-column-envio-foraneo-wrap .envio-foraneo-thumb svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Área de concepto/descripción ocupa el espacio que antes tenía cantidad */
.left-column-envio-foraneo-wrap .envio-foraneo-concept {
  flex: 1;
  min-width: 0;
  align-items: stretch;
}

.left-column-envio-foraneo-wrap .envio-foraneo-concept .carousel-quote-concept {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 6px;
}

.left-column-envio-foraneo-wrap .envio-foraneo-title {
  font-weight: 600;
  margin-bottom: 0;
}

.left-column-envio-foraneo-wrap .envio-foraneo-detalle {
  width: 100%;
  min-height: 56px;
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  flex: 1;
}

.left-column-envio-foraneo-wrap .envio-foraneo-peso {
  font-size: 0.85em;
  opacity: 0.9;
  margin-top: 4px;
}

.left-column-envio-foraneo-wrap .envio-foraneo-detalle::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.left-column-envio-foraneo-wrap .envio-foraneo-detalle:focus {
  outline: none;
  border-color: rgba(100, 200, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.left-column-dropzone .drop-container {
  position: static;
  display: block;
  width: 100%;
  height: auto;
}

.left-column-dropzone .drop-zone {
  width: 100%;
  padding: 24px;
  border-radius: 16px;
}

/* Modo compacto */
.left-column-compact-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 8px;
}

.left-column-compact-carousel {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.left-column-compact-carousel::-webkit-scrollbar {
  width: 6px;
}

.left-column-compact-carousel::-webkit-scrollbar-track {
  background: transparent;
}

.left-column-compact-carousel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.left-column-compact-carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.left-column-compact-carousel .model-carousel-container-vertical {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
}

/* En modo compacto, cliente y miniaturas son una sola columna de elementos iguales */
.left-column-compact-carousel .model-carousel-inner-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.left-column-compact-dropzone {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.left-column-compact-dropzone .drop-container {
  position: static;
  width: 100%;
  height: 100%;
}

.left-column-compact-dropzone .drop-zone {
  width: 100%;
  height: 100%;
  padding: 16px;
  border-radius: 12px;
}

.left-column-compact-dropzone .drop-zone h2 {
  font-size: 14px;
}

.left-column-compact-dropzone .drop-zone p {
  font-size: 11px;
}

.left-column-compact-dropzone .drop-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

/* BANNER DE VISTA DE CONJUNTO */
.group-thumbnail-banner {
  width: 100%;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  cursor: default;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-thumbnail-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.group-thumbnail-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

.group-thumbnail-banner-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(100, 200, 255, 0.25);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(100, 200, 255, 0.4);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}



/* ===== TEMA PARA VISTA PREVIA (ULTRA-LIGERA / DOCUMENTO) ===== */
.is-preview-mode {
  background: white !important;
  color: #1e293b !important;
}

.is-preview-mode .left-column-content {
  background: white !important;
  color: #1e293b !important;
  padding-right: 20px; /* Más aire en los bordes */
  max-width: 800px;    /* Centrar el "documento" en medio si la pantalla es muy ancha */
  margin: 0 auto;
}

.is-preview-mode .left-column-header-label,
.is-preview-mode .left-column-label,
.is-preview-mode .left-column-section-title,
.is-preview-mode .left-column-condiciones-block-label,
.is-preview-mode .left-column-total-label,
.is-preview-mode .left-column-price-label,
.is-preview-mode .carousel-info-label {
  color: #64748b !important; /* Azul grisáceo para labels */
}

.is-preview-mode .left-column-header-value,
.is-preview-mode .left-column-value,
.is-preview-mode .left-column-total-value,
.is-preview-mode .left-column-action-button,
.is-preview-mode .carousel-info-value {
  color: #1e293b !important;
}

.is-preview-mode .left-column-condiciones-select {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

.is-preview-mode .left-column-condiciones-select:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.is-preview-mode .left-column-condiciones-select-arrow {
  color: #94a3b8 !important;
}

.is-preview-mode .left-column-total-grand-value {
  color: #2563eb !important; /* Azul intenso para el total */
}

.is-preview-mode .left-column-button-download {
  background: #2563eb !important;
  color: white !important;
  border: none !important;
}

.is-preview-mode .left-column-button-save {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #475569 !important;
}

/* Ajustes para el carrusel en modo preview */
.is-preview-mode .carousel-item-vertical {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.is-preview-mode .carousel-item-vertical.selected {
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 1px #3b82f6 !important;
}

.is-preview-mode .carousel-concept-line:first-child,
.is-preview-mode .carousel-concept-line-input {
  color: #1e293b !important;
}

.is-preview-mode .carousel-concept-line,
.is-preview-mode .processing-text,
.is-preview-mode .error-text,
.is-preview-mode .carousel-subtotal-value {
  color: #64748b !important;
}

.is-preview-mode .carousel-quantity-input,
.is-preview-mode .carousel-price-input,
.is-preview-mode .carousel-info-input {
  color: #1e293b !important;
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.is-preview-mode .carousel-price-symbol {
  color: #94a3b8 !important;
}

.is-preview-mode .left-column-sidebar-toggle {
  color: #94a3b8 !important;
}

.is-preview-mode .left-column-sidebar-toggle:hover {
  color: #1e293b !important;
}

/* Ajustes para la miniatura del cliente en modo preview */
.is-preview-mode .carousel-item-client .thumbnail-canvas-vertical {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.is-preview-mode .carousel-item-client .carousel-client-initials {
  color: #475569 !important;
}

.is-preview-mode .carousel-item-add {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

.is-preview-mode .carousel-item-add:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

.is-preview-mode .material-icons {
  color: #64748b;
}.area-informacion-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent !important;
  backdrop-filter: none !important;
}

.area-informacion-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.area-informacion-content::-webkit-scrollbar {
  width: 6px;
}

.area-informacion-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.area-informacion-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.area-informacion-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.area-informacion-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
}

.area-informacion-empty-text {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  text-align: center;
  font-weight: 300;
}

.area-informacion-header {
  margin-bottom: 4px;
  padding-bottom: 0;
  border-bottom: none;
}

.area-informacion-pieza-nombre {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  word-break: break-word;
}

.area-informacion-pieza-nombre-input {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  font-family: inherit;
  transition: all 0.2s ease;
}

.area-informacion-pieza-nombre-input:focus {
  outline: none;
  border-color: rgba(100, 200, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.area-informacion-pieza-nombre-input:disabled {
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
}

.area-informacion-pieza-nombre-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.area-informacion-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.area-informacion-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
}

.area-informacion-section-header:hover {
  opacity: 0.9;
}

.area-informacion-section-header-with-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.area-informacion-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.area-informacion-section-toggle {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  transition: transform 0.2s ease;
  user-select: none;
  min-width: 16px;
  text-align: center;
}

.area-informacion-section-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.area-informacion-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
  border-bottom: none;
}

.area-informacion-field-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  flex-shrink: 0;
}

.area-informacion-field-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 12px;
  margin-bottom: 4px;
  grid-column: 1 / -1;
}

.area-informacion-field-subtitle:first-child {
  margin-top: 0;
}

.area-informacion-field-value {
  font-size: 12px;
  color: white;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  flex: 1;
}

.area-informacion-field-highlight {
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-top: 0;
  border: none;
}

.area-informacion-field-value-highlight {
  color: #64c8ff;
  font-weight: 600;
  font-size: 12px;
}

.area-informacion-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 0;
}

.area-informacion-dimensions-grid.cylindrical-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.area-informacion-dimension {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
}

.area-informacion-dimension-axis {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}

.area-informacion-dimension-value {
  font-size: 12px;
  font-weight: 600;
  color: white;
  text-align: left;
}

.area-informacion-unit-toggle {
  display: inline-flex;
  gap: 6px;
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.area-informacion-unit-button {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  font-weight: 400;
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  transition: color 0.2s ease;
  font-family: inherit;
}

.area-informacion-unit-button:hover {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
}

.area-informacion-unit-button.selected {
  background: transparent;
  color: white;
  font-weight: 400;
}

.area-informacion-warning {
  font-size: 12px;
  color: #ffb347;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: none;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.area-informacion-info {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  padding: 0;
  background: transparent;
  border-radius: 0;
  text-align: left;
  font-style: italic;
}

/* Complexity Styles */
.complexity-field {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 4px;
}

.complexity-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.complexity-value {
  text-align: left;
  flex: 0 0 auto;
  min-width: 60px;
}

.complexity-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.complexity-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.confidence-warning-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 69, 58, 0.2);
  color: #ff453a;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 8px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 69, 58, 0.3);
  vertical-align: middle;
}

/* Technical JSON Styles */
.tecnico-section {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  padding-top: 16px !important;
}

.area-informacion-json-viewer {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  padding: 12px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
  overflow-x: auto;
  max-height: 400px;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.area-informacion-json-viewer::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.area-informacion-json-viewer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.material-selector-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.material-selector-container {
    width: 100%;
    max-width: 900px;
    height: 75vh;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { transform: translateY(15px) opacity(0); }
    to { transform: translateY(0) opacity(1); }
}

/* Header */
.material-selector-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.material-selector-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.material-selector-title-row h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #fff;
    letter-spacing: -0.3px;
}

.material-selector-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

.material-selector-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.material-selector-close-btn:hover {
    color: #fff;
}

.material-selector-close-btn .material-icons {
    font-size: 20px;
}

/* Search */
.material-selector-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.material-selector-search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.material-selector-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
}

.material-selector-clear-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-selector-clear-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.material-selector-clear-btn .material-icons {
    font-size: 18px;
}

.material-selector-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 12px 10px 42px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.material-selector-search-input:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(100, 200, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.05);
}

/* Main Layout */
.material-selector-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.material-selector-sidebar {
    width: 220px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.1);
    padding: 20px 12px;
    overflow-y: auto;
}

.material-selector-nav-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-left: 12px;
}

.material-selector-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
}

.material-selector-nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.material-selector-nav-item.active {
    background: rgba(217, 162, 27, 0.08);
    color: #D9A21B;
    font-weight: 600;
}

.material-selector-nav-item .material-icons {
    font-size: 18px;
}

/* Content Area */
.material-selector-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: transparent;
}

.material-selector-suggestions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.material-selector-quick-select {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.material-selector-quick-select span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
}

.material-selector-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-selector-chip:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(100, 200, 255, 0.3);
    color: #fff;
}

/* Material Grid */
.material-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.material-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.material-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(100, 200, 255, 0.2);
    transform: translateY(-2px);
}

.material-card.selected {
    border-color: rgba(217, 162, 27, 0.5);
    background: rgba(217, 162, 27, 0.04);
    box-shadow: 0 0 0 1px rgba(217, 162, 27, 0.2);
}

.material-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.material-card-tag {
    font-size: 9px;
    font-weight: 700;
    color: rgba(100, 200, 255, 0.6);
    background: rgba(100, 200, 255, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.material-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.material-card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    margin: 6px 0 16px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.material-stat-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.material-stat-value {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 2px;
}

/* Footer */
.material-selector-footer {
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.material-selector-selection-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.material-selector-selection-dot {
    width: 8px;
    height: 8px;
    background: #D9A21B;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(217, 162, 27, 0.4);
}

.material-selector-selection-text {
    color: rgba(255, 255, 255, 0.4);
}

.material-selector-selection-name {
    color: #D9A21B;
    font-weight: 600;
}

.material-selector-actions {
    display: flex;
    gap: 12px;
}

.material-selector-btn-cancel {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-selector-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.material-selector-btn-apply {
    padding: 8px 24px;
    background: #D9A21B;
    border: none;
    color: #000;
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.material-selector-btn-apply:hover {
    background: #e5ac1d;
}

.material-selector-btn-apply:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
}
/* Ancho de la barra: espacio para 4 cuadros (Material + 4 procesos + Agregar = 6 × 120px + 5 × 12px gap). Variable en :root (app.css) */
.process-rail {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: var(--process-rail-width, 780px);
  min-width: var(--process-rail-width, 780px);
  bottom: 0;
  min-height: 140px;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px 20px 16px;
  box-sizing: border-box;
  z-index: 20;
  overflow: visible;
  transition: transform 0.3s ease;
}

/* Con menú desplegado, subir la barra (y el overlay) por encima de todo para que el clic fuera cierre */
.process-rail-overlay-active {
  z-index: 9990;
}

/* Etiqueta "Pieza actual" para dejar claro que material/procesos aplican a la pieza en vista */
.process-rail-pieza-actual-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 6px;
  text-align: center;
}



/* Animación de desaparición al eliminar proceso */
.process-rail-process-card--deleting {
  animation: process-rail-card-delete 0.4s ease forwards;
  pointer-events: none;
}

@keyframes process-rail-card-delete {
  to {
    opacity: 0;
    transform: scale(0.6) translateY(-24px);
  }
}

.process-rail-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  width: 100%;
  align-items: flex-end;
  padding-bottom: 0;
  flex-shrink: 0;
}

.process-rail-track-centered {
  justify-content: center;
}

.process-rail-track-expanded {
  position: relative;
  z-index: 2520;
  overflow: visible;
}

/* Animación al agregar proceso: solo el nuevo cuadro entra suave (evita saltos con 3+ items) */
.process-rail-card-just-added {
  transition: none;
  animation: process-rail-card-just-added 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity;
}

@keyframes process-rail-card-just-added {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.process-rail-track::-webkit-scrollbar {
  height: 6px;
}

.process-rail-track::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.process-rail-track::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.process-rail-track::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Tarjetas: mismo estilo que botones/zonas de cotización (border-radius 8px, bordes sutiles) */
.process-rail-card {
  min-width: 120px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: white;
  position: relative;
  transition: all 0.2s ease;
}

.process-rail-card:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.process-rail-card.active {
  border-color: rgba(100, 200, 255, 0.6);
  background: rgba(100, 200, 255, 0.2);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.35);
}

.process-rail-card.ready {
  border-color: rgba(100, 200, 255, 0.35);
}

.process-rail-card.pending {
  opacity: 0.75;
}

.process-rail-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.process-rail-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.5);
}

.process-rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

.process-rail-card.active .process-rail-dot {
  background: #64c8ff;
  box-shadow: 0 0 6px rgba(100, 200, 255, 0.6);
}

.process-rail-card.disabled {
  opacity: 0.6;
}

.process-rail-square {
  width: 120px;
  height: 120px;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
}

/* Etiquetas: homologadas con left-column (10px, uppercase, 0.5) */
.process-rail-square-label {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.5);
}

.process-rail-square-value {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  word-break: break-word;
}

.process-rail-material-price {
  font-size: 10px;
  font-weight: 600;
  color: #fb923c;
  margin-top: 6px;
  letter-spacing: 0.2px;
}

.process-rail-process-card {
  background: rgba(255, 255, 255, 0.06);
}

.process-rail-process-card[draggable="true"] {
  cursor: grab;
}

.process-rail-process-card[draggable="true"]:active {
  cursor: grabbing;
}

.process-rail-process-card[data-dragging="true"] {
  opacity: 0.6;
  border-color: rgba(100, 200, 255, 0.5);
  box-shadow: 0 0 10px rgba(100, 200, 255, 0.35);
}

/* Botón de tres puntos en tarjeta de proceso */
.process-rail-process-card {
  position: relative;
}

.process-rail-process-card-menu {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  z-index: 2;
}

.process-rail-process-card-menu:hover {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.process-rail-process-card-menu-dots {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
}

/* Botón agregar: mismo estilo que left-column-button-save (accent #64c8ff) */
.process-rail-add-card {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgba(100, 200, 255, 0.2);
  border: 1px solid rgba(100, 200, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.process-rail-add-card:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.process-rail-add-card:hover:not(:disabled) {
  background: rgba(100, 200, 255, 0.3);
  border-color: rgba(100, 200, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 200, 255, 0.2);
}

.process-rail-add-card:active:not(:disabled) {
  transform: translateY(0);
}

.process-rail-add-icon {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  color: #64c8ff;
}

.process-rail-add-text {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: rgba(255, 255, 255, 0.85);
}

/* Ventana de edición de proceso (tres puntos) */
.process-rail-edit-window-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 42;
}

.process-rail-edit-window {
  width: 90%;
  max-width: 380px;
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.process-rail-edit-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.process-rail-edit-window-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: white;
}

.process-rail-edit-window-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Wrappers Material, Stock y Agregar: mismo layout para desplegable */
/* Cuadro Cantidad: mismo tamaño que Material, valor numérico que adapta fuente */
.process-rail-cantidad-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  flex-shrink: 0;
}

.process-rail-cantidad-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: text;
}

.process-rail-cantidad-card--disabled {
  cursor: not-allowed;
}

.process-rail-cantidad-value-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.process-rail-cantidad-input {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  text-align: center;
  outline: none;
  line-height: 1.2;
  transition: font-size 0.15s ease;
}

.process-rail-cantidad-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.process-rail-cantidad-input:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* Ocultar flechas del input number en navegadores modernos */
.process-rail-cantidad-input::-webkit-outer-spin-button,
.process-rail-cantidad-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.process-rail-cantidad-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.process-rail-material-wrap,
.process-rail-stock-wrap,
.process-rail-add-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.process-rail-material-card,
.process-rail-stock-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.process-rail-expand-cliente-lleva {
  margin-top: 8px;
  padding: 8px 12px;
  background: #3d4d63;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
}

.process-rail-expand-cliente-lleva label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.process-rail-expand-cliente-lleva input[type="checkbox"] {
  cursor: pointer;
}

.process-rail-add-wrap-expanded {
  z-index: 2520;
  overflow: visible;
}

/* Overlay para cerrar desplegable al hacer click fuera (debajo del track expandido, encima del resto de la UI) */
.process-rail-expand-overlay {
  position: fixed;
  inset: 0;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: transparent;
  z-index: 2510;
  cursor: default;
  pointer-events: auto;
}

/* Columna de categorías: primer click despliega hacia arriba (encima del cuadro Agregar) */
.process-rail-expand-column {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 0;
  pointer-events: auto;
  transform-origin: bottom center;
}

/* Animación ligera al colapsar al hacer clic fuera */
.process-rail-expand-column--closing {
  animation: process-rail-expand-collapse 0.2s ease forwards;
  pointer-events: none;
}

@keyframes process-rail-expand-collapse {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

/* Cuadros desplegables: fondo sólido para contraste con el texto (sin transparencia) */
.process-rail-expand-box {
  min-width: 120px;
  min-height: 120px;
  width: 120px;
  height: 120px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #3d4d63;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.98);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

/* Categorías (primer nivel): animación hacia arriba */
.process-rail-expand-category.process-rail-expand-box {
  animation: process-rail-expand-up 0.3s ease forwards;
  transform-origin: bottom center;
}

.process-rail-expand-box:hover {
  background: #4a5c75;
  border-color: rgba(100, 200, 255, 0.45);
}

.process-rail-expand-category {
  font-family: inherit;
  border: none;
}

.process-rail-expand-box-selected {
  background: #3a5070;
  border-color: rgba(100, 200, 255, 0.5);
}

/* Fila categoría + nombres: categoría a la izquierda, nombres en fila hacia la derecha */
.process-rail-expand-category-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Contenedor de nombres (máquinas): siempre en horizontal a la derecha de la categoría */
.process-rail-expand-names-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

/* Nombres (segundo nivel): animación hacia la derecha */
.process-rail-expand-name {
  font-family: inherit;
  border: none;
  animation: process-rail-expand-right 0.3s ease forwards;
  transform-origin: left center;
}

@keyframes process-rail-expand-up {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes process-rail-expand-right {
  from {
    opacity: 0;
    transform: translateX(-16px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Modal procesos: por delante de barra superior, zona de cotización y todo lo demás; bloquea toda interacción fuera del modal */
.process-rail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  pointer-events: auto;
}

.process-rail-modal {
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.process-rail-modal.process-rail-modal--two-col {
  max-width: 720px;
}

.process-rail-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.process-rail-modal-header-spacer {
  flex: 1;
}

.process-rail-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.process-rail-modal-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.process-rail-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: scale(1.05);
}

.process-rail-modal-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Layout de dos columnas para modal proceso / add-proceso */
.process-rail-modal-two-col {
  display: flex;
  gap: 20px;
  flex: 1;
  min-height: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .process-rail-modal-two-col {
    flex-direction: column;
  }
}

.process-rail-modal-left-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
}

.process-rail-modal-config-panel {
  flex: 0 0 300px;
  min-width: 260px;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  align-self: flex-start;
}

@media (max-width: 640px) {
  .process-rail-modal-config-panel {
    min-width: 100%;
    max-width: none;
  }
}

.process-rail-modal-config-panel .process-rail-modal-section-title {
  margin-bottom: 4px;
}

.process-rail-modal-dynamic-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.process-rail-modal-dynamic-field label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
}

.process-rail-modal-dynamic-field .process-rail-modal-input,
.process-rail-modal-dynamic-field .process-rail-modal-select {
  padding: 8px 12px;
  font-size: 13px;
}

/* Overlay para cerrar el panel al hacer clic fuera */
.process-config-side-panel-overlay {
  position: fixed;
  inset: 0;
  top: 92px;
  z-index: 2500;
  background: rgba(0, 0, 0, 0.1);
  cursor: default;
  pointer-events: none;
  /* Permitir clicks a través para brújula/canvas */
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Panel lateral derecho (estética como columna Información: sin fondo opaco, alineado a la derecha) */
.process-config-side-panel {
  position: fixed;
  top: 92px;
  right: 0;
  width: 350px;
  cursor: default;
  min-width: 300px;
  max-width: min(350px, calc(50vw - var(--process-rail-half, 390px)));
  height: calc(100vh - 92px);
  display: flex;
  flex-direction: column;
  background: transparent !important;
  backdrop-filter: none !important;
  border-left: none !important;
  box-shadow: none !important;
  pointer-events: auto;
  overflow: hidden;
  z-index: 2501;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.process-config-side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.process-config-side-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.process-config-side-panel-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease, color 0.2s ease;
}

.process-config-side-panel-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.process-config-side-panel-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.process-config-side-panel-legend-sep {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

.process-config-side-panel-back-link {
  margin-top: 10px;
  background: none;
  border: none;
  color: #64c8ff;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}

.process-config-side-panel-back-link:hover {
  color: #8ad4ff;
}

.process-config-side-panel-tiempo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.process-config-side-panel-tiempo-input {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
}

.process-config-side-panel-tiempo-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #64c8ff;
  cursor: pointer;
}

.process-config-side-panel-tiempo-input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #64c8ff;
  cursor: pointer;
  border: none;
}

.process-config-side-panel-tiempo-label-group {
  min-width: 60px;
  text-align: right;
}

.process-config-side-panel-tiempo-manual {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.process-config-side-panel-tiempo-manual .area-informacion-field {
  align-items: center !important;
}

.process-config-side-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.process-config-side-panel-btn {
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease, color 0.2s ease;
}

.process-config-side-panel-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.process-config-side-panel-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.process-config-side-panel-btn-primary {
  background: rgba(100, 200, 255, 0.25);
  color: #64c8ff;
  border: 2px solid rgba(100, 200, 255, 0.5);
}

.process-config-side-panel-btn-primary:hover {
  background: rgba(100, 200, 255, 0.35);
}

.process-config-side-panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: transparent !important;
  backdrop-filter: none !important;
}

.process-config-side-panel-content::-webkit-scrollbar {
  width: 6px;
}

.process-config-side-panel-content::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 3px;
}

.process-config-side-panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}

.process-config-side-panel .area-informacion-section {
  background: transparent !important;
  border: none !important;
  padding: 0;
}

.process-config-side-panel .area-informacion-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
}

.process-config-side-panel .area-informacion-field {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 0;
}

.process-config-side-panel .area-informacion-field-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  flex-shrink: 0;
}

.process-config-side-panel .area-informacion-field-value {
  font-size: 12px;
  color: white;
  font-weight: 600;
  text-align: right;
  word-break: break-word;
  flex: 1;
}

.process-config-side-panel .process-rail-modal-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.process-config-side-panel .process-rail-modal-category-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

.process-config-side-panel .process-rail-modal-category-btn.selected {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.6);
  color: #64c8ff;
}

.process-config-side-panel .process-rail-modal-input {
  width: 100%;
  max-width: 140px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}

.process-rail-modal-section {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.process-rail-modal-section.centered {
  align-items: center;
  text-align: center;
}

.process-rail-modal-section.centered .process-rail-modal-select {
  max-width: 260px;
}

.process-rail-modal-section-title {
  font-size: 14px;
  font-weight: 500;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
}

.process-rail-modal-category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.process-rail-modal-category-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.process-rail-modal-category-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.process-rail-modal-category-btn.selected {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.6);
  color: #64c8ff;
}

.process-rail-modal-section-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
  line-height: 1.4;
}

.process-rail-modal-stock-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.process-rail-modal-stock-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-family: inherit;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.process-rail-modal-stock-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.process-rail-modal-stock-btn.selected {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.6);
  color: #64c8ff;
}

.process-rail-modal-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.process-rail-modal-tiempo-slider {
  display: flex;
  align-items: center;
  gap: 12px;
}

.process-rail-modal-tiempo-input {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  outline: none;
}

.process-rail-modal-tiempo-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64c8ff;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(100, 200, 255, 0.5);
}

.process-rail-modal-tiempo-input::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #64c8ff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 8px rgba(100, 200, 255, 0.5);
}

.process-rail-modal-tiempo-value {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  min-width: 52px;
  text-align: right;
}

.process-rail-modal-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
}

.process-rail-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
}

.process-rail-modal-procedures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.process-rail-modal-procedure-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.process-rail-modal-procedure-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.process-rail-modal-procedure-list::-webkit-scrollbar {
  width: 6px;
}

.process-rail-modal-procedure-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.process-rail-modal-option {
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.process-rail-modal-option:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.process-rail-modal-option.selected {
  background: rgba(100, 200, 255, 0.15);
  border-color: rgba(100, 200, 255, 0.6);
  color: #64c8ff;
}

.process-rail-modal-slider {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.process-rail-modal-input,
.process-rail-modal-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.process-rail-modal-select option {
  background-color: #2d2d2d;
  color: white;
  padding: 10px;
}

.process-rail-modal-input:focus,
.process-rail-modal-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(100, 200, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(100, 200, 255, 0.1);
}

.process-rail-modal-select:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.process-rail-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.process-rail-modal-button {
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.2s ease;
}

.process-rail-modal-button.cancel {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.process-rail-modal-button.cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.process-rail-modal-button.save {
  background: rgba(100, 200, 255, 0.2);
  color: #64c8ff;
  border: 2px solid rgba(100, 200, 255, 0.4);
}

.process-rail-modal-button.save:hover {
  background: rgba(100, 200, 255, 0.3);
  border-color: rgba(100, 200, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(100, 200, 255, 0.2);
}

.process-rail-empty {
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* MMN en modal de material */
.process-rail-modal-section-mmn {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 8px;
}

.process-rail-modal-mmn-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.process-rail-modal-mmn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.process-rail-modal-mmn-label {
  color: rgba(255, 255, 255, 0.7);
}

.process-rail-modal-mmn-value {
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.process-rail-modal-mmn-override-check {
  display: block;
  margin-top: 10px;
  margin-bottom: 8px;
}

.process-rail-modal-mmn-custom {
  margin-top: 8px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-rail-modal-mmn-custom-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.process-rail-modal-mmn-custom-row label {
  min-width: 90px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.process-rail-modal-mmn-custom-row input {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 13px;
}

.process-rail-modal-mmn-custom-row input:focus {
  outline: none;
  border-color: rgba(100, 200, 255, 0.5);
}

/* Procesos: botones de categoría/nombre (mismo estilo que categorías material) */
.process-rail-modal-process-buttons {
  margin-top: 4px;
}

/* Enlace para volver atrás en el flujo de selección de proceso */
.process-rail-modal-back-link {
  background: none;
  border: none;
  color: rgba(100, 200, 255, 0.95);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 4px;
  text-decoration: none;
  font-family: inherit;
  transition: color 0.2s ease;
}

.process-rail-modal-back-link:hover {
  color: #64c8ff;
  text-decoration: underline;
}

/* Leyenda única Proceso — Nombre */
.process-rail-modal-legend-section {
  border-color: rgba(100, 200, 255, 0.15);
}

.process-rail-modal-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 14px;
  padding: 4px 0;
}

.process-rail-modal-legend-process {
  color: white;
  font-weight: 500;
}

.process-rail-modal-legend-sep {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
}

.process-rail-modal-legend-name {
  color: #64c8ff;
  font-weight: 500;
}

/* Botón Guardar deshabilitado cuando falta selección */
.process-rail-modal-button.save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.process-rail-modal-button.save:disabled:hover {
  transform: none;
  box-shadow: none;
}.new-client-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.new-client-modal-content {
    background: #0f172a;
    width: 100%;
    max-width: 600px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: modal-enter 0.3s ease-out;
}

@keyframes modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.new-client-modal-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-client-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #f8fafc;
    font-weight: 600;
}

.close-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.new-client-form {
    padding: 24px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #fb923c;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #f8fafc;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group textarea {
    height: 80px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #fb923c;
    background: rgba(15, 23, 42, 0.8);
}

.new-client-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.cancel-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.save-btn {
    background: #fb923c;
    border: none;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.save-btn:hover {
    background: #f97316;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
}

.save-btn:active {
    transform: translateY(0);
}.measurement-display-floating {
    position: fixed;
    top: 130px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(100, 200, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    width: 240px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.measurement-display-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

.measurement-icon {
    font-size: 18px;
    color: #64c8ff;
}

.measurement-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.05em;
    flex: 1;
}

.measurement-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.measurement-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ff5f5f;
}

.measurement-clear-btn .material-icons {
    font-size: 16px;
}

.measurement-display-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.measurement-value-primary {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.measurement-value-primary .value {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 24px;
    font-weight: 600;
    color: #64c8ff;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.3);
}

.measurement-value-primary .unit {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.measurement-subvalues {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subvalue-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.subvalue-key {
    color: rgba(255, 255, 255, 0.4);
}

.subvalue-val {
    color: rgba(255, 255, 255, 0.9);
    font-family: monospace;
}/* Layout pantalla completa: coherente con visor (paleta #0f172a, #1e293b, acento verde, glass) */
.dashboard-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #0f172a;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* —— Sidebar —— */
.dashboard-sidebar {
  width: 240px;
  min-width: 240px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.98);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.dashboard-sidebar-brand {
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-sidebar-brand-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: rgba(34, 197, 94, 0.9);
  background: rgba(34, 197, 94, 0.12);
  border-radius: 10px;
}

.dashboard-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.dashboard-sidebar-brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.dashboard-sidebar-brand-os {
  font-size: 0.7rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.08em;
}

.dashboard-sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.dashboard-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  margin: 0 0.5rem;
  border-radius: 8px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s, background 0.2s;
}

.dashboard-sidebar-item:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

.dashboard-sidebar-item.active {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
}

.dashboard-sidebar-item-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.dashboard-sidebar-admin {
  padding: 0.5rem 1rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-sidebar-admin-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #64748b;
  padding: 0.5rem 0.5rem 0.25rem;
}

.dashboard-sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
}

.dashboard-sidebar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.25);
  color: #4ade80;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.dashboard-sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dashboard-sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #e2e8f0;
}

.dashboard-sidebar-user-plan {
  font-size: 0.7rem;
  color: #64748b;
}

/* —— Main —— */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.dashboard-header-bar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.5rem;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.06) inset;
}

.dashboard-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-search-icon {
  color: #64748b;
  flex-shrink: 0;
}

.dashboard-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.875rem;
  outline: none;
}

.dashboard-search-input::placeholder {
  color: #64748b;
}

.dashboard-taller-select-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-taller-select-icon {
  color: #64748b;
  flex-shrink: 0;
}

.dashboard-taller-select {
  padding: 0.45rem 0.6rem;
  font-size: 0.8125rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  cursor: pointer;
  min-width: 160px;
}

.dashboard-taller-select:hover,
.dashboard-taller-select:focus {
  border-color: rgba(255, 255, 255, 0.18);
  outline: none;
}

.dashboard-taller-select option {
  background: #1e293b;
  color: #e2e8f0;
}

.dashboard-header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dashboard-header-visor-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 12px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.1);
  letter-spacing: 0.02em;
}

.dashboard-header-visor-btn:hover {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3) 0%, rgba(34, 197, 94, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.6);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.25);
  color: #4ade80;
}

.dashboard-header-visor-btn span {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
}

.dashboard-header-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.dashboard-header-btn:hover {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-header-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  background: rgba(34, 197, 94, 0.85);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.dashboard-header-cta:hover {
  background: rgba(34, 197, 94, 0.95);
  border-color: rgba(34, 197, 94, 0.7);
  transform: translateY(-1px);
}

.dashboard-header-icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.dashboard-header-icon-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}

/* —— Content (scrollable) —— */
.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* KPI cards */
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-kpi-card {
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dashboard-kpi-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.dashboard-kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dashboard-kpi-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
}

.dashboard-kpi-badge {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.75rem;
}

.dashboard-kpi-badge-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
}

.dashboard-kpi-badge-amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.dashboard-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.dashboard-kpi-card.premium {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.dashboard-kpi-card.premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.dashboard-kpi-card.premium:hover::before {
  transform: translateX(100%);
}

.dashboard-kpi-badge-gold {
  background: rgba(217, 162, 27, 0.15);
  color: #D9A21B;
  box-shadow: 0 0 15px rgba(217, 162, 27, 0.2);
}

.dashboard-kpi-badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.dashboard-kpi-badge-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.dashboard-panel.glass {
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-dot.sent { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.status-dot.draft, .status-dot.draft_saved { background: #94a3b8; }
.status-dot.accepted { background: #10b981; box-shadow: 0 0 8px #10b981; }
.status-dot.final { background: #059669; box-shadow: 0 0 8px #059669; }
.status-dot.printed { background: #7c3aed; box-shadow: 0 0 8px #7c3aed; }
.status-dot.approved { background: #047857; box-shadow: 0 0 8px #047857; }
.status-dot.issued { background: #2563eb; box-shadow: 0 0 8px #2563eb; }
.status-dot.rejected, .status-dot.cancelled { background: #f87171; }
.status-dot.expired { background: #f59e0b; }

.active-jobs-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.active-job-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  transition: all 0.2s;
}

.active-job-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.job-info { display: flex; flex-direction: column; }
.job-folio { color: #D9A21B; font-weight: 700; font-size: 0.9rem; }
.job-client { font-size: 0.8rem; color: #94a3b8; }

.job-meta { display: flex; flex-direction: column; align-items: flex-end; }
.job-parts { font-size: 0.75rem; color: #64748b; }
.job-status-tag { 
  font-size: 0.65rem; 
  padding: 0.15rem 0.5rem; 
  background: rgba(34, 197, 94, 0.1); 
  color: #4ade80; 
  border-radius: 4px; 
  margin-top: 0.25rem;
}

/* Multi-layer status tags */
.status-layer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.status-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.status-tag.commercial { background: rgba(217, 162, 27, 0.1); color: #D9A21B; border: 1px solid rgba(217, 162, 27, 0.2); }
.status-tag.production { background: rgba(34, 197, 94, 0.1); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.2); }
.status-tag.payment { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-tag.shipping { background: rgba(168, 85, 247, 0.1); color: #a855f7; border: 1px solid rgba(168, 85, 247, 0.2); }

/* Layered Status Variations */
.status-tag.pending { background: rgba(148, 163, 184, 0.1); color: #94a3b8; border-color: rgba(148, 163, 184, 0.2); opacity: 0.7; }
.status-tag.in_progress { background: rgba(139, 92, 246, 0.1); color: #a78bfa; border-color: rgba(139, 92, 246, 0.3); box-shadow: 0 0 10px rgba(139, 92, 246, 0.1); }
.status-tag.finished { background: rgba(59, 130, 246, 0.1); color: #60a5fa; border-color: rgba(59, 130, 246, 0.3); }
.status-tag.delivered { background: rgba(34, 197, 94, 0.2); color: #4ade80; border-color: rgba(34, 197, 94, 0.4); }
.status-tag.paid { background: rgba(34, 197, 94, 0.25); color: #fff; border-color: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.2); }
.status-tag.unpaid { background: rgba(248, 113, 113, 0.1); color: #f87171; border-color: rgba(248, 113, 113, 0.2); }
.status-tag.partial { background: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245, 158, 11, 0.2); }

/* Panels (Pending + Active Jobs) */
.dashboard-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-panel {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
  overflow: hidden;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-panel-head h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

.dashboard-panel-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.dashboard-panel-link:hover {
  color: #4ade80;
}

.dashboard-panel-body {
  padding: 1rem 1.25rem;
  min-height: 160px;
}

.dashboard-panel-table-wrap {
  padding: 0;
  overflow-x: auto;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.dashboard-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-weight: 500;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dashboard-table td {
  padding: 0.75rem 1.25rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table-empty td {
  color: #64748b;
  text-align: center;
  font-style: italic;
  padding: 2rem;
}

.dashboard-jobs-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: #64748b;
  font-size: 0.875rem;
}

.dashboard-jobs-empty-icon {
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

/* Config brief */
.dashboard-config-brief {
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.5);
}

.dashboard-config-brief-title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin: 0 0 1rem 0;
}

.dashboard-config-brief-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.dashboard-config-brief-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dashboard-config-brief-label {
  font-size: 0.75rem;
  color: #64748b;
}

.dashboard-config-brief-value {
  font-size: 1rem;
  font-weight: 600;
  color: #e2e8f0;
}

.dashboard-config-brief-value-ok {
  color: #4ade80;
}

.dashboard-config-brief-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 1rem 0 0 0;
}

/* Responsive: stack panels on narrow */
@media (max-width: 1024px) {
  .dashboard-kpis {
    grid-template-columns: 1fr;
  }

  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-config-brief-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-sidebar {
    width: 72px;
    min-width: 72px;
  }

  .dashboard-sidebar-brand-text,
  .dashboard-sidebar-item span,
  .dashboard-sidebar-admin-label,
  .dashboard-sidebar-user-info {
    display: none;
  }

  .dashboard-sidebar-brand {
    justify-content: center;
    padding: 1rem;
  }

  .dashboard-sidebar-item {
    justify-content: center;
    margin: 0 0.35rem;
    padding: 0.65rem;
  }

  .dashboard-sidebar-user {
    justify-content: center;
    padding: 0.75rem;
  }

  .dashboard-header-cta span,
  .dashboard-header-btn span {
    display: none;
  }

  .dashboard-config-brief-grid {
    grid-template-columns: 1fr;
  }
}

/* Cotizaciones Page specific styles (migrated from modal) */
.cotizaciones-page .stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s;
}

.cotizaciones-page .stat-card:hover { border-color: rgba(217, 162, 27, 0.4); transform: translateY(-2px); }
.cotizaciones-page .stat-card.active { border-color: #D9A21B; background: rgba(217, 162, 27, 0.05); }

.cotizaciones-page .stat-label { font-size: 0.75rem; color: rgba(255, 255, 255, 0.4); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.cotizaciones-page .stat-value { font-size: 1.5rem; font-weight: 800; color: white; }

.quote-card-v2:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(217, 162, 27, 0.3) !important;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-status-glow.draft { background: #9ca3af; box-shadow: 0 0 10px rgba(156, 163, 175, 0.3); }
.card-status-glow.sent { background: #60a5fa; box-shadow: 0 0 10px rgba(96, 165, 250, 0.3); }
.card-status-glow.accepted { background: #4ade80; box-shadow: 0 0 10px rgba(74, 222, 128, 0.3); }
.card-status-glow.rejected { background: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, 0.3); }

.status-select-v2 {
  appearance: none;
  padding: 0.4rem 1.75rem 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  min-width: 100px;
  text-transform: uppercase;
  transition: all 0.2s;
}

.status-select-v2.draft { background: rgba(156, 163, 175, 0.15); color: #9ca3af; }
.status-select-v2.sent { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.status-select-v2.accepted { background: rgba(74, 222, 128, 0.15); color: #4ade80; }
.status-select-v2.rejected { background: rgba(248, 113, 113, 0.15); color: #f87171; }

.btn-action-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action-v2:hover:not(:disabled) { background: rgba(255, 255, 255, 0.15); transform: translateY(-1px); }
.btn-action-v2.visor {
  background: linear-gradient(135deg, rgba(217, 162, 27, 0.2) 0%, rgba(217, 162, 27, 0.05) 100%);
  border-color: rgba(217, 162, 27, 0.4);
  color: #fff;
}

.btn-action-v2.visor:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(217, 162, 27, 0.3) 0%, rgba(217, 162, 27, 0.1) 100%);
  border-color: rgba(217, 162, 27, 0.6);
  color: #D9A21B;
  box-shadow: 0 4px 15px rgba(217, 162, 27, 0.2);
}

.btn-action-v2.source:hover:not(:disabled) { border-color: #60a5fa; color: #60a5fa; }
.btn-action-v2.pdf:hover:not(:disabled) { border-color: #D9A21B; color: #D9A21B; }

.btn-action-v2:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(1);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
}

.spinner {
  width: 40px; height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid #D9A21B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Overlay Styles */
.dashboard-layout.is-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.dashboard-header-visor-btn.overlay-close {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.dashboard-header-visor-btn.overlay-close:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: translateY(-1px);
}
.cotizaciones-page {
  padding: 1rem;
}

.quotes-table-container {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1rem;
}

.quotes-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.quotes-table th {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.quotes-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  vertical-align: middle;
  transition: all 0.2s ease;
}

.quote-row {
  transition: background 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.quote-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.quote-row:hover .row-actions {
  opacity: 1;
  transform: translateX(0);
}

.folio-cell {
  color: #D9A21B;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.client-cell {
  font-weight: 600;
  color: white;
}

.status-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-dropdown {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  padding: 0.25rem 1.5rem 0.25rem 0.5rem;
  position: relative;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 0.5rem center;
  background-size: 1rem;
}

.status-dropdown option {
    background: #1e293b;
    color: white;
}

.status-badge.draft_saved, .status-badge.draft, .status-badge.pending { background: rgba(156, 163, 175, 0.1); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.2); }
.status-badge.final { background: rgba(16, 185, 129, 0.1); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.2); }
.status-badge.sent { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-badge.accepted { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }
.status-badge.rejected { background: rgba(248, 113, 113, 0.1); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.2); }
.status-badge.cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }
.status-badge.versioned { background: rgba(139, 92, 246, 0.1); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.2); }
.status-badge.in_production, .status-badge.in_progress { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; border: 1px solid rgba(139, 92, 246, 0.2); }
.status-badge.finished { background: rgba(59, 130, 246, 0.1); color: #3b82f6; border: 1px solid rgba(59, 130, 246, 0.2); }
.status-badge.delivered { background: rgba(99, 102, 241, 0.1); color: #6366f1; border: 1px solid rgba(99, 102, 241, 0.2); }
.status-badge.paid { background: rgba(74, 222, 128, 0.1); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.2); }

.amount-cell {
  font-weight: 700;
  color: white;
}

.pieces-cell {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

.user-cell {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  font-style: italic;
}

.row-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 1;
}

.action-btn-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 60px;
  justify-content: center;
}

.action-btn-pill.visor { 
  background: rgba(217, 162, 27, 0.1); 
  border-color: rgba(217, 162, 27, 0.3); 
  color: #D9A21B; 
}
.action-btn-pill.visor:hover { 
  background: #D9A21B; 
  color: black; 
}

.action-btn-pill.pdf { 
  background: rgba(59, 130, 246, 0.1); 
  border-color: rgba(59, 130, 246, 0.3); 
  color: #60a5fa; 
}
.action-btn-pill.pdf:hover { 
  background: #3b82f6; 
  color: white; 
}

.action-btn-pill.source { 
  background: rgba(148, 163, 184, 0.1); 
  border-color: rgba(148, 163, 184, 0.3); 
  color: #94a3b8; 
}
.action-btn-pill.source:hover { 
  background: #64748b; 
  color: white; 
}

.action-btn-pill.delete {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}
.action-btn-pill.delete:hover {
    background: #ef4444;
    color: white;
}

/* Dots menu */
.dots-menu {
  position: relative;
}

.dots-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
}

.dots-btn:hover {
  color: white;
}

.spinner-mini {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.attention-indicator {
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  gap: 2rem;
}

.filters-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.stats-bar {
  display: flex;
  gap: 1rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  min-width: 100px;
}

.stat-item .label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.stat-item .value {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.stat-item.active {
  background: rgba(217, 162, 27, 0.1);
  border: 1px solid rgba(217, 162, 27, 0.2);
}

.stat-item.active .value {
  color: #D9A21B;
}

.toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  cursor: pointer;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #D9A21B;
}

input:checked + .slider:before {
  transform: translateX(20px);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ancho barra inferior de procesos (4 cuadros: Material + 4 procesos + Agregar) y mitad para centrado */
:root {
  --process-rail-width: 780px;
  --process-rail-half: 390px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  overflow: hidden;
}

.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: 'liga';
}

.app {
  width: 100vw;
  height: 100vh;
  background: linear-gradient(180deg, #353b4e 0%, #98b9d4 50%, hsl(236, 32%, 30%) 100%);
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-content {
  margin-top: 80px;
  height: calc(100vh - 80px);
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: margin-top 0.3s ease, height 0.3s ease;
}

.app.has-back-bar .top-bar {
  top: 40px;
}

.app.has-back-bar .app-content {
  margin-top: 96px;
  height: calc(100vh - 96px);
}

.app.has-back-bar .app-column-left {
  top: 96px;
  height: calc(100% - 96px);
}

.app.has-back-bar .app-column-right {
  top: 96px;
  height: calc(100% - 96px);
}

/* Layout de dos columnas */
.app-columns-layout {
  display: flex;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 10;
  pointer-events: none;
}

/* Visor a pantalla completa detrás de todo */
.app-viewer-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: auto;
}

.app-viewer-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.app-column-left {
  position: fixed;
  top: 92px;
  left: 0;
  width: 633px;
  min-width: 200px;
  max-width: min(633px, calc(50vw - var(--process-rail-half, 390px)));
  height: calc(100% - 92px);
  display: flex;
  flex-direction: column;
  background: transparent !important;
  backdrop-filter: none !important;
  border-right: none !important;
  box-shadow: none !important;
  pointer-events: auto;
  overflow: hidden;
  z-index: 10;
  transition: width 0.3s ease;
}

.app-column-left.compact {
  width: 200px !important;
}

.app-column-left.custom {
  width: var(--custom-width, 400px) !important;
}

.app-column-left.quote-full-width {
  width: 100% !important;
  max-width: none !important;
  z-index: 9999 !important;
  background: white !important;
  top: 80px;
  height: calc(100% - 80px);
}

.hidden-viewer {
  display: none !important;
}

.app-column-right {
  position: fixed;
  top: 92px;
  right: 0;
  width: 350px;
  min-width: 300px;
  max-width: min(350px, calc(50vw - var(--process-rail-half, 390px)));
  height: calc(100% - 92px);
  display: flex;
  flex-direction: column;
  background: transparent !important;
  backdrop-filter: none !important;
  border-left: none !important;
  box-shadow: none !important;
  pointer-events: auto;
  overflow: hidden;
  z-index: 10;
  transition: width 0.25s ease, min-width 0.25s ease, max-width 0.25s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
  transform: translateX(0);
  opacity: 1;
}

.app-column-right.app-column-right-hidden {
  width: 0;
  min-width: 0;
  max-width: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateX(30px);
  opacity: 0;
}

/* Texto legible sobre el visor en zonas transparentes */
.app-column-left,
.app-column-right {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.app-bottom-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: var(--process-rail-width, 780px);
  bottom: 0;
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 15;
  pointer-events: auto;
  transition: transform 0.3s ease;
}



.app-bottom-bar-button {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.app-bottom-bar-button:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.app-bottom-bar-button:active {
  transform: translateY(0);
}

/* Botón información: solo icono, mismo tamaño y alineación que el resto de la barra */
.viewer-toggle-info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}

.viewer-toggle-info-btn:hover {
  color: rgba(255, 255, 255, 1);
  opacity: 1;
}

.viewer-toggle-info-btn:active {
  opacity: 0.85;
}




.drop-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 10;
}

.drop-zone {
  pointer-events: all;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 80px 120px;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
}

.drop-zone:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.45);
  transform: scale(1.02);
}

.drop-zone.dragging {
  background: rgba(100, 200, 255, 0.15);
  border-color: #64c8ff;
  transform: scale(1.05);
}

.drop-icon {
  font-size: 64px;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.drop-icon .material-icons {
  font-size: 64px;
}

.drop-zone h2 {
  color: white;
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.drop-zone p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-weight: 300;
}

/* Añade esto al final de tu App.css */

/* Oculta el DropZone cuando hay modelo cargado */
.drop-container {
  display: contents;
}

/* Oculta el DropZone cuando hay modelo cargado */
.drop-container {
  display: contents;
}

/* Añade a App.css */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  color: white;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #64c8ff;
  animation: spin 1s ease-in-out infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.file-processing-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  background: transparent;
  pointer-events: none;
  overflow: hidden;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loader-card {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  width: 280px;
  margin-right: 24px;
  margin-bottom: 24px;
  animation: cardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.loader-3d-container {
  width: 80px;
  height: 80px;
  position: relative;
  margin-bottom: 8px;
  mask-image: radial-gradient(circle, black 50%, transparent 95%);
  -webkit-mask-image: radial-gradient(circle, black 50%, transparent 95%);
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  width: 100%;
  position: relative;
  z-index: 10;
}

.loader-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.loader-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #64c8ff;
  margin: 0;
  opacity: 0.8;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.loader-filename-container {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-filename {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.loader-progress-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.loader-progress-bar {
  width: 240px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.loader-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #64c8ff);
  box-shadow: 0 0 12px rgba(100, 200, 255, 0.5);
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loader-status-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.loader-status-dot {
  width: 6px;
  height: 6px;
  background: #64c8ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #64c8ff;
  animation: pulse 2s infinite;
}

.loader-status {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.05em;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

/* Mantener overlay de error con diseño coherente */
.file-processing-error {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(10, 2, 2, 0.9);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-processing-error-card {
  background: rgba(30, 0, 0, 0.4);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.file-processing-error-icon {
  font-size: 48px;
  color: #ef4444;
  margin-bottom: 20px;
  display: block;
}

.file-processing-card {
  display: none; /* Ocultar el toast antiguo ya que ahora tenemos el loader full screen */
}


.file-processing-error-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.file-processing-error-icon {
  color: #ef4444;
  font-size: 24px;
}

.file-processing-error-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-processing-error-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.file-processing-error-msg {
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.5;
}

/* Copia esto al final de tu App.css */

/* Panel desplegable */

/* Resto de clases del panel... */

/* ✅ NUEVO: Cursor feedback para piezas interactivas */
canvas {
  cursor: grab;
}

canvas:active {
  cursor: grabbing;
}

/* ✅ NUEVO: Overlay informativo de modo */
.mode-indicator {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Barra "Volver a cotización" cuando se llega desde Nueva cotización */
.viewer-back-to-cotizacion {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 100;
}

.viewer-back-to-cotizacion-btn {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.viewer-back-to-cotizacion-btn:hover {
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.viewer-back-to-cotizacion-link {
  font-size: 13px;
  color: #94a3b8;
  text-decoration: none;
}

.viewer-back-to-cotizacion-link:hover {
  color: #e2e8f0;
}

/* —— Nueva cotización: pantalla completa y modo "Editar" (columna + visor) —— */
.app-layout-quote-full {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.quote-full-header {
  flex-shrink: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 20;
}

.quote-full-header-link {
  font-size: 0.9rem;
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.quote-full-header-link:hover {
  color: #e2e8f0;
}

.quote-full-header-editar {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  background: rgba(34, 197, 94, 0.85);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.quote-full-header-editar:hover {
  background: rgba(34, 197, 94, 0.95);
  transform: translateY(-1px);
}

/* En modo cotización completa, la columna izquierda es hijo directo de .app y ocupa el espacio */
.app-layout-quote-full>.app-column-left {
  flex: 1;
  min-height: 0;
  position: relative;
  top: auto;
  left: auto;
  width: 100% !important;
  height: 100%;
}

.app-layout-quote-full .app-column-left.compact {
  width: 100% !important;
}

.app-layout-quote-full .app-column-left.custom {
  width: 100% !important;
}

/* Alineación de la barra superior derecha y botón "i" */
.top-bar-right-settings {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}

.top-bar-taller-name {
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  height: 32px;
}

.viewer-toggle-info-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  width: 40px;
  height: 40px;
}

.viewer-toggle-info-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.viewer-toggle-info-btn[aria-expanded="true"] {
  color: #64c8ff;
  background: rgba(100, 200, 255, 0.15);
}

/* Botones de control del visor - Flotantes debajo de la barra superior */
.viewer-floating-controls {
  position: fixed;
  top: 92px;
  /* 80px de topbar + 12px gap */
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(2, 48, 70, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  gap: 4px;
  flex-wrap: nowrap;
  width: max-content;
}

.viewer-floating-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.viewer-floating-button {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.viewer-floating-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.viewer-floating-button.active {
  color: #64c8ff;
  background: rgba(100, 200, 255, 0.15);
}

.viewer-floating-button[title="Volver a la vista de conjunto (Mesa)"] {
  width: auto;
  padding: 0 12px;
  gap: 8px;
  color: #64c8ff;
  font-weight: 600;
}

.viewer-floating-button-text {
  font-size: 13px;
  white-space: nowrap;
}

.viewer-floating-button .material-icons {
  font-size: 20px;
}

.viewer-floating-separator {
  width: 1px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

.viewer-floating-slider {
  margin-left: 10px;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.viewer-floating-slider input[type="range"] {
  width: 80px;
  height: 4px;
  accent-color: #64c8ff;
}

/* Menú desplegable Horizontal para cortes */
.viewer-floating-section-menu-wrap {
  position: relative;
}

.viewer-floating-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  display: flex;
  flex-direction: row;
  gap: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 90;
  width: max-content;
  animation: slideDownFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.viewer-floating-dropdown-item {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.viewer-floating-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.viewer-floating-dropdown-item.active {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.15);
}

.viewer-floating-dropdown-item .material-icons {
  font-size: 20px;
}

.viewer-floating-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.viewer-floating-dropdown-item.active {
  color: #64c8ff;
  background: rgba(100, 200, 255, 0.15);
}

.viewer-floating-dropdown-item .material-icons {
  font-size: 18px;
}


.app-viewer-block {
  position: relative;
  z-index: 5;
}
/* Loading Screen */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: #1a1a1a;
  color: white;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(217, 162, 27, 0.1);
  border-top: 4px solid #D9A21B;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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


/* Management Overlay Styles */
.management-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  pointer-events: auto;
}

/* App Shell & Persistence Layers */
.app-shell-container {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.persistent-viewer-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  transition: filter 0.4s ease, transform 0.4s ease;
}

.management-overlay-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: overlayFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-shell-container.management-active .persistent-viewer-layer {
  filter: blur(4px) brightness(0.5);
  transform: scale(0.98);
}
