.centrar {
  margin-top: 4%;
  text-align: center;
  width: 100%;
}

.fondo {
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
  text-align: center;
}

.container-main {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 20px;
  padding: 20px;
  height: calc(100vh - 120px);
}
.center {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
}
/* CSS */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  width: 100vw;
  height: 110vh;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  flex-direction: column;
  background: #fff;
  padding: 30px ;
  border-radius: 10px;
  width: 550px;
  max-width: 90%;
  text-align: center;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.modal-actions {
  margin-top: 15px;
  display: flex;
  justify-content: space-between;
}

.modal-actions button {
  padding: 6px 12px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.modal-actions button:last-child {
  background-color: red;
}

.error {
  color: red;
  font-size: 0.85em;
  margin-top: 5px;
}



.buttons {
  display: flex;
  justify-content: space-between;
}

button {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}


/* Paneles */
.container-formConfig,
.container-form,
.container-formPropiedades {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.title-form {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 20px;
  color: #333;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

/* Grid del formulario */
.form-grid {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 2px dashed #e0e0e0;
  border-radius: 8px;
  min-height: 400px;
}

.grid-row {
  display: contents;
}

.grid-cell {
  min-height: 120px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  padding: 10px;
}

.grid-cell:hover {
  border-color: #007bff;
  background: #f8f9fa;
}

.grid-cell.selected {
  border-color: #007bff;
  background: #e3f2fd;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.grid-cell.has-element {
  background: #e8f5e8;
  border-color: #28a745;
}

.cell-element {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.cell-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #999;
  font-size: 12px;
  text-align: center;
}

.cell-placeholder span {
  font-weight: bold;
}

.cell-placeholder small {
  font-size: 10px;
  font-style: italic;
}

/* Inputs del formulario */
.form__input, .form__select, .form__textarea {
  width: 80%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.form__input:focus, .form__select:focus, .form__textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.form__textarea {
  resize: vertical;
  min-height: 80px;
}

.form__radio-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botón de eliminar campo */
.remove-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-btn:hover {
  background: #c82333;
}

/* Selector de campo */
.selector {
  margin-top: 20px;
  background: #f8f9fa;
  padding: 15px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.element-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.element-buttons button {
  padding: 10px 15px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.element-buttons button:hover {
  background: #0056b3;
}

/* Panel de propiedades */
.container-formPropiedades {
  max-height: 600px;
  overflow-y: auto;
}

.properties-panel {
  background: #f8f9fa;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.properties-panel h3 {
  font-size: 16px;
  font-weight: bold;
  color: #007bff;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.properties-panel label {
  font-weight: 500;
  font-size: 13px;
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
}

.properties-panel input[type="text"],
.properties-panel input[type="number"],
.properties-panel input[type="email"],
.properties-panel input[type="checkbox"] {
  margin-bottom: 10px;
}

.properties-panel input[type="checkbox"] {
  margin-right: 6px;
}

.properties-panel button {
  margin-top: 15px;
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.properties-panel button:hover {
  background: #c82333;
}
/* Contenedor principal de navegación de tabs */
.tabs-navigation {
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

/* Contenedor de headers de tabs */
.tab-header {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  padding: 0 10px;
}

/* Cada tab individual */
.tab-item {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  min-width: 120px;
  max-width: 200px;
}

/* Tab activo */
.tab-item.active {
  background: #ffffff;
  border-color: #007bff;
  border-bottom: 2px solid #ffffff;
  margin-bottom: -2px;
  z-index: 1;
}

/* Hover effect para tabs inactivos */
.tab-item:not(.active):hover {
  background: #e9ecef;
  border-color: #adb5bd;
}

/* Input para editar nombre del tab */
.tab-name-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  width: 100%;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

/* Input cuando está en focus */
.tab-name-input:focus {
  background: rgba(0, 123, 255, 0.1);
  border: 1px solid #007bff;
}

/* Tab activo - input styling */
.tab-item.active .tab-name-input {
  color: #007bff;
  font-weight: 600;
}

/* Botón de cerrar tab */
.tab-close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 8px;
  border-radius: 3px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

/* Hover effect para botón cerrar */
.tab-close-btn:hover {
  background: #ff4757;
  color: white;
  transform: scale(1.1);
}

/* Scroll horizontal suave para muchos tabs */
.tab-header::-webkit-scrollbar {
  height: 4px;
}

.tab-header::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.tab-header::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 2px;
}

.tab-header::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
  .tab-item {
    min-width: 100px;
    max-width: 150px;
    padding: 6px 8px;
  }

  .tab-name-input {
    font-size: 12px;
  }

  .tab-close-btn {
    width: 18px;
    height: 18px;
    font-size: 14px;
    margin-left: 4px;
  }
}

/* Animación para tabs nuevos */
@keyframes tabSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tab-item {
  animation: tabSlideIn 0.3s ease;
}

/* Estilo especial para cuando solo hay un tab */
.tab-item:only-child .tab-close-btn {
  display: none;
}

/* Indicador visual de tab activo */
.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #007bff;
  border-radius: 2px 2px 0 0;
}

/* Responsive */
@media (max-width: 1200px) {
  .container-main {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
}
