.diagram-manager-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.diagram-manager {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.diagram-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.diagram-manager-header h2 {
  margin: 0;
  font-size: 24px;
}

.close-button {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-button:hover {
  color: #000;
}

.storage-info {
  padding: 15px 20px;
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.storage-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.storage-badge.server {
  background: #e3f2fd;
  color: #1976d2;
}

.storage-badge.local {
  background: #fff3e0;
  color: #f57c00;
}

.storage-note {
  font-size: 14px;
  color: #666;
}

.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 10px 20px;
  border-left: 4px solid #c62828;
}

.diagram-manager-actions {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.action-button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  background: #f5f5f5;
  color: #333;
  transition: background 0.2s;
}

.action-button:hover {
  background: #e0e0e0;
}

.action-button.primary {
  background: #4caf50;
  color: white;
}

.action-button.primary:hover {
  background: #45a049;
}

.action-button.danger {
  background: #f44336;
  color: white;
}

.action-button.danger:hover {
  background: #da190b;
}

.action-button.share {
  background: #2196f3;
  color: white;
}

.action-button.share:hover {
  background: #0b7dda;
}

.loading {
  padding: 40px;
  text-align: center;
  color: #666;
}

.diagram-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #666;
}

.empty-state .hint {
  font-size: 14px;
  color: #999;
  margin-top: 10px;
}

.diagram-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  margin-bottom: 10px;
  transition: background 0.2s;
}

.diagram-item:hover {
  background: #f5f5f5;
}

.diagram-info h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
}

.diagram-meta {
  font-size: 13px;
  color: #666;
}

.diagram-actions {
  display: flex;
  gap: 10px;
}

.diagram-actions .action-button {
  padding: 6px 12px;
  font-size: 13px;
}

.save-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  min-width: 300px;
}

.save-dialog h3 {
  margin: 0 0 15px 0;
}

.save-dialog input {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 15px;
  font-size: 14px;
}

.dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-buttons button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.dialog-buttons button:first-child {
  background: #4caf50;
  color: white;
}

.dialog-buttons button:last-child {
  background: #f5f5f5;
}